Skip to content

Commit

Permalink
fix: additional new lines on rendering info output (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Aug 11, 2024
1 parent fc667a6 commit 694032c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 694032c

Please sign in to comment.