Do not automatically push after binary component is created.
Fixes
@@ -114,25 +114,13 @@ A full list of component types that can be deployed is available using: 'odo com
} else if len(componentBinary) != 0 {
path, err := filepath.Abs(componentBinary)
checkError(err, "")
- fi, err := os.Stat(path)
- if err != nil {
- checkError(err, "")
- }
- if fi.IsDir() {
- fmt.Println("Please provide path to binary instead of a directory")
- os.Exit(1)
- }
err = component.CreateFromPath(client, componentName, componentType, path, applicationName, "binary")
checkError(err, "")
fmt.Printf("Please wait, creating %s component ...\n", componentName)
err = component.Build(client, componentName, false, true)
checkError(err, "")
- fmt.Printf("Component was successfully created, pushing %s to the component.\n", path)
- err = component.PushLocal(client, componentName, applicationName, path, true, os.Stdout)
- checkError(err, fmt.Sprintf("failed to push component: %v", componentName))
-
fmt.Printf("Component '%s' was created.\n", componentName)
-
+ fmt.Printf("To push source code to the component run 'odo push'\n")
} else {
// we want to use and save absolute path for component
dir, err := filepath.Abs("./")
