diff --git a/v2/cmd/wails/internal/commands/dev/dev.go b/v2/cmd/wails/internal/commands/dev/dev.go index 7f8c2e8e..97604ee3 100644 --- a/v2/cmd/wails/internal/commands/dev/dev.go +++ b/v2/cmd/wails/internal/commands/dev/dev.go @@ -37,16 +37,25 @@ import ( ) func LogGreen(message string, args ...interface{}) { + if len(message) == 0 { + return + } text := fmt.Sprintf(message, args...) println(colour.Green(text)) } func LogRed(message string, args ...interface{}) { + if len(message) == 0 { + return + } text := fmt.Sprintf(message, args...) println(colour.Red(text)) } func LogDarkYellow(message string, args ...interface{}) { + if len(message) == 0 { + return + } text := fmt.Sprintf(message, args...) println(colour.DarkYellow(text)) } diff --git a/v2/cmd/wails/internal/commands/update/update.go b/v2/cmd/wails/internal/commands/update/update.go index 5eef6af2..8539d1b1 100644 --- a/v2/cmd/wails/internal/commands/update/update.go +++ b/v2/cmd/wails/internal/commands/update/update.go @@ -55,6 +55,12 @@ func AddSubcommand(app *clir.Cli, w io.Writer, currentVersion string) error { desiredVersion, err = github.GetLatestPreRelease() } else { desiredVersion, err = github.GetLatestStableRelease() + if err != nil { + println("") + println("No stable release found for this major version. To update to the latest pre-release (eg beta), run:") + println(" wails update -pre") + return nil + } } } if err != nil { diff --git a/v2/cmd/wails/main.go b/v2/cmd/wails/main.go index e69db18d..dd7219fb 100644 --- a/v2/cmd/wails/main.go +++ b/v2/cmd/wails/main.go @@ -23,7 +23,7 @@ func fatal(message string) { } func banner(_ *clir.Cli) string { - return fmt.Sprintf("%s %s\n", + return fmt.Sprintf("%s %s", colour.Yellow("Wails CLI"), colour.DarkRed(internal.Version)) }