Skip to content

Commit

Permalink
fixup! Display "Interactive mode enabled" only when running `odo init…
Browse files Browse the repository at this point in the history
…` interactively
  • Loading branch information
rm3l committed Sep 7, 2022
1 parent 74b1614 commit b48425e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pkg/log/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,13 @@ func Printf(format string, a ...interface{}) {
}
}

// Println will output a new line when applicable
func Println() {
if !IsJSON() {
fmt.Fprintln(GetStdout())
}
}

// Success will output in an appropriate "success" manner
// ✓ <message>
func Success(a ...interface{}) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/odo/cli/init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ func (o *InitOptions) run(ctx context.Context) (devfileObj parser.DevfileObj, pa
infoOutput = messages.SourceCodeDetected
}
log.Title(messages.InitializingNewComponent, infoOutput, "odo version: "+version.VERSION)
log.Println()
if len(o.flags) == 0 {
log.Infof("\n%s", messages.InteractiveModeEnabled)
log.Info(messages.InteractiveModeEnabled)
}

devfileObj, devfilePath, err := o.clientset.InitClient.SelectAndPersonalizeDevfile(o.flags, o.contextDir)
Expand Down

0 comments on commit b48425e

Please sign in to comment.