bpoole16 commented on a change in pull request #2520: Prints 
bashauto-completion install script to STDOUT
URL: 
https://github.com/apache/incubator-openwhisk/pull/2520#discussion_r131438180
 
 

 ##########
 File path: tools/cli/go-whisk-cli/commands/sdk.go
 ##########
 @@ -74,17 +74,27 @@ var sdkInstallCmd = &cobra.Command{
         case "ios":
             err = iOSInstall()
         case "bashauto":
-            err = WskCmd.GenBashCompletionFile(BASH_AUTOCOMPLETE_FILENAME)
-            if (err != nil) {
-                whisk.Debug(whisk.DbgError, "GenBashCompletionFile('%s`) 
error: \n", BASH_AUTOCOMPLETE_FILENAME, err)
-                errStr := wski18n.T("Unable to generate '{{.name}}': {{.err}}",
-                        map[string]interface{}{"name": 
BASH_AUTOCOMPLETE_FILENAME, "err": err})
-                werr := whisk.MakeWskError(errors.New(errStr), 
whisk.EXITCODE_ERR_GENERAL, whisk.DISPLAY_MSG, whisk.NO_DISPLAY_USAGE)
-                return werr
-            }
-            fmt.Printf(
-                wski18n.T("bash_completion_msg",
+            if flags.sdk.stdout {
+                if err = WskCmd.GenBashCompletion(os.Stdout); err != nil {
 
 Review comment:
   One uses `GenBashCompletion` the other uses `GenBashCompletionFile`.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to