Skip to content

Commit d6e5fba

Browse files
committed
JGC-473 - Fix --delete-properties separator in version-update help
Addresses review from @shayshim: - version-update AIDescription: --delete-properties is parsed by utils.ParseSliceFlag, which splits on ';' (not ','). Fixed the example ("env,owner" -> "env;owner") and the gotcha ("comma-separated" -> "semicolon-separated"); a comma-joined value was treated as one literal key. - Corrected the pre-existing inaccurate doc comment on ParseSliceFlag in utils.go ("comma-separated" -> "semicolon-separated").
1 parent baaffa1 commit d6e5fba

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apptrust/commands/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func ServerDetailsByFlags(ctx *components.Context) (*coreConfig.ServerDetails, e
4141
return serverDetails, nil
4242
}
4343

44-
// ParseSliceFlag parses a comma-separated string into a slice of strings.
44+
// ParseSliceFlag parses a semicolon-separated string into a slice of strings.
4545
func ParseSliceFlag(flagValue string) []string {
4646
if flagValue == "" {
4747
return []string{}

apptrust/commands/version/update_app_version_cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ Prerequisites:
137137
Common patterns:
138138
$ jf apptrust version-update my-app 1.0.0 --tag=stable
139139
$ jf apptrust version-update my-app 1.0.0 --properties="env=prod;owner=team-a,team-b"
140-
$ jf apptrust version-update my-app 1.0.0 --delete-properties="env,owner"
140+
$ jf apptrust version-update my-app 1.0.0 --delete-properties="env;owner"
141141
$ jf apptrust version-update my-app 1.0.0 --tag=stable --properties="release-notes=https://example.com/notes"
142142
143143
Gotchas:
144144
- --properties replaces values for the specified keys; other keys are untouched.
145145
- --properties uses semicolons to separate key=value pairs and commas to separate multiple values for a single key: key1=v1,v2;key2=v3.
146-
- --delete-properties takes a comma-separated list of keys and removes those keys entirely.
146+
- --delete-properties takes a semicolon-separated list of keys and removes those keys entirely.
147147
- This command does not change sources or promotion stage; use version-update-sources or version-promote for those.
148148
149149
Related: jf apptrust version-update-sources, jf apptrust version-create`,

0 commit comments

Comments
 (0)