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 committed Aug 11, 2024
1 parent 181ee63 commit 576e0ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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
5 changes: 3 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,8 @@ var getUserKeysCmd = &cobra.Command{
return err
}
if len(userKeys.SSHKeys) == 0 {
return handleNilResults("No SSH keys for user '%s'\n", cmd, strings.ToLower(userEmail))
return handleNilResults("There are no SSH keys for user '%s'\n", cmd, strings.ToLower(userEmail))
return nil
}

data := []output.Data{}
Expand Down

0 comments on commit 576e0ef

Please sign in to comment.