Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: additional new lines on rendering info output #373

Merged
merged 1 commit into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,17 @@ var rootCmd = &cobra.Command{
// Do periodic detection of whether an update is available for lagoon-cli users.
timeToCheckForUpdates, err := updatecheck.IsUpdateNeeded(updateFile, updateInterval)
if err != nil {
output.RenderInfo(fmt.Sprintf("Could not perform update check %v", err), outputOptions)
output.RenderInfo(fmt.Sprintf("Could not perform update check %v\n", err), outputOptions)
}
if timeToCheckForUpdates && isInternetActive() {
// Recreate the updatefile with current time so we won't do this again soon.
err = updatecheck.ResetUpdateTime(updateFile)
if err != nil {
output.RenderInfo(fmt.Sprintf("Failed to update updatecheck file %s", updateFile), outputOptions)
output.RenderInfo(fmt.Sprintf("Failed to update updatecheck file %s\n", updateFile), outputOptions)
}
updateNeeded, updateURL, err := updatecheck.AvailableUpdates("uselagoon", "lagoon-cli", lagoonCLIVersion)
if err != nil {
output.RenderInfo("Could not check for updates. This is most often caused by a networking issue.", outputOptions)
output.RenderInfo("Could not check for updates. This is most often caused by a networking issue.\n", outputOptions)
output.RenderError(err.Error(), outputOptions)
return
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func parseSSHKeyFile(sshPubKey string, keyName string, keyValue string, userEmai
keyName = stripNewLines(splitKey[2])
} else if keyName == "" && len(splitKey) == 2 {
keyName = userEmail
output.RenderInfo("no name provided, using email address as key name", outputOptions)
output.RenderInfo("no name provided, using email address as key name\n", outputOptions)
}
SSHKeyInput := schema.AddSSHKeyInput{
SSHKey: schema.SSHKey{
Expand Down Expand Up @@ -407,7 +407,7 @@ var getUserKeysCmd = &cobra.Command{
return err
}
if len(userKeys.SSHKeys) == 0 {
output.RenderInfo(fmt.Sprintf("No SSH keys for user '%s'", strings.ToLower(userEmail)), outputOptions)
output.RenderInfo(fmt.Sprintf("There are no SSH keys for user '%s'\n", strings.ToLower(userEmail)), outputOptions)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var addVariableCmd = &cobra.Command{
}, outputOptions)
fmt.Fprintf(cmd.OutOrStdout(), "%s", r)
} else {
output.RenderInfo(fmt.Sprintf("variable %s remained unchanged", varName), outputOptions)
output.RenderInfo(fmt.Sprintf("variable %s remained unchanged\n", varName), outputOptions)
}
return nil
},
Expand Down
Loading