diff --git a/subcommands/common_config.go b/subcommands/common_config.go index c7c39c07..f56caaf5 100644 --- a/subcommands/common_config.go +++ b/subcommands/common_config.go @@ -258,7 +258,7 @@ func SetUpdatesConfig(opts *SetUpdatesConfigOptions, reportedTag string, reporte } if !changed { - fmt.Println("No changes found. Device is already configured with the specified options.") + logrus.Infof("No changes found. Device is already configured with the specified options.") os.Exit(0) } diff --git a/subcommands/login/cmd.go b/subcommands/login/cmd.go index 3d07479c..a23d5c44 100644 --- a/subcommands/login/cmd.go +++ b/subcommands/login/cmd.go @@ -81,12 +81,12 @@ func doLogin(cmd *cobra.Command, args []string) { } else if creds.Config.AccessToken == "" { subcommands.DieNotNil(creds.Get()) } else { - fmt.Println("You are already logged in to Foundries.io services.") + logrus.Infof("You are already logged in to Foundries.io services.") os.Exit(0) } subcommands.SaveOauthConfig(creds.Config) - fmt.Println("You are now logged in to Foundries.io services.") + logrus.Infof("You are now logged in to Foundries.io services.") } func promptForCreds(credsUrl string) (string, string) { diff --git a/subcommands/targets/edit.go b/subcommands/targets/edit.go index 4536576d..8ed21675 100644 --- a/subcommands/targets/edit.go +++ b/subcommands/targets/edit.go @@ -65,7 +65,7 @@ func doEdit(cmd *cobra.Command, args []string) { edit.Stdin = os.Stdin logrus.Debug("Running editor and waiting for it to finish...") if err := edit.Run(); err != nil { - fmt.Println("Editing cancelled: ", err) + logrus.Warning("Editing cancelled: ", err) os.Exit(0) } @@ -75,7 +75,7 @@ func doEdit(cmd *cobra.Command, args []string) { logrus.Error("ERROR: Unable to re-read tempfile:", err) } if bytes.Equal(content, orig) { - fmt.Println("No changes found, exiting.") + logrus.Infof("No changes found, exiting.") os.Exit(0) } diff --git a/subcommands/targets/prune.go b/subcommands/targets/prune.go index d32ea1d9..4ccad760 100644 --- a/subcommands/targets/prune.go +++ b/subcommands/targets/prune.go @@ -126,7 +126,7 @@ func doPrune(cmd *cobra.Command, args []string) { target_names = append(target_names, names...) } } else { - fmt.Println("Nothing to prune") + logrus.Infof("Nothing to prune") os.Exit(0) } }