Skip to content

Commit 68d5cc0

Browse files
authored
fix: honeyvent flag values (#1187)
1 parent 2e704d1 commit 68d5cc0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

cli/cmd/honeyvent.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func parseFlags(args []string) (flags []string) {
252252
continue
253253
}
254254

255-
flags = append(flags, arg)
255+
flags = append(flags, strings.Split(arg, "=")[0])
256256
}
257257
return
258258
}

cli/cmd/honeyvent_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ func TestParseFlags(t *testing.T) {
154154
// lots of things
155155
{args: []string{"command", "--flag", "subcmd", "--debug", "arg1", "--json", "arg2", "--noninteractive"},
156156
expectedFlags: []string{"--flag", "--debug", "--json", "--noninteractive"}},
157+
// flag values
158+
{args: []string{"command", "--flag=value", "--subaccount=random-account"},
159+
expectedFlags: []string{"--flag", "--subaccount"}},
157160

158161
// invalid flag
159162
{args: []string{"-"},

0 commit comments

Comments
 (0)