Skip to content

Commit 105df77

Browse files
author
Josh Newman
committed
fix(ls): fix line break for all commands
1 parent b0de77e commit 105df77

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

cmd/ls.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ func runLsCmd(cmd *cobra.Command, args []string) {
7676

7777
val := *param.Value
7878

79-
// seems like the upgrade to v2 of the aws-sdk sends back a new line on values :shrug:
80-
if strings.HasSuffix(val, "\n") {
81-
val = strings.TrimSuffix(val, "\n")
82-
}
83-
8479
if displayValues {
8580
row = insertColumn(row, 1, val)
8681
}
@@ -128,6 +123,16 @@ func getParams(options *getParamsOptions, params []types.Parameter, nextToken *s
128123
panic(err)
129124
}
130125

126+
for i := 0; i < len(out.Parameters); i++ {
127+
val := *out.Parameters[i].Value
128+
129+
// seems like the upgrade to v2 of the aws-sdk sends back a new line on values :shrug:
130+
if strings.HasSuffix(val, "\n") {
131+
trimmed := strings.TrimSuffix(val, "\n")
132+
out.Parameters[i].Value = &trimmed
133+
}
134+
}
135+
131136
params = append(params, out.Parameters...)
132137

133138
if out.NextToken != nil {

0 commit comments

Comments
 (0)