Skip to content

Commit

Permalink
Notify when mod install creates a default mod
Browse files Browse the repository at this point in the history
Remove newline from end of `mod install` output
  • Loading branch information
kaidaguerre committed Mar 7, 2024
1 parent 0ec0c3f commit 68ff095
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/cmd/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ func runModInstallCmd(cmd *cobra.Command, args []string) {
if err != nil {
error_helpers.FailOnError(err)
}
fmt.Printf("Initializing mod, created %s.\n", app_specific.DefaultModFileName()) //nolint:forbidigo // acceptable output
}

// if any mod names were passed as args, convert into formed mod names
Expand All @@ -141,7 +142,10 @@ func runModInstallCmd(cmd *cobra.Command, args []string) {
error_helpers.FailOnError(err)
}

fmt.Println(modinstaller.BuildInstallSummary(installData)) //nolint:forbidigo // intended output
summary := modinstaller.BuildInstallSummary(installData)
// tactical: remove trailing newline
summary = strings.TrimRight(summary, "\n")
fmt.Println(summary) //nolint:forbidigo // intended output
}

func getPluginVersions(ctx context.Context) *modconfig.PluginVersionMap {
Expand Down

0 comments on commit 68ff095

Please sign in to comment.