buildkite / cli

A command line interface for Buildkite.
MIT License
169 stars 44 forks source link

The `bk build new` doesn't allow you to set environment variables that include `=` symbols. #382

Closed top-oai closed 1 month ago

top-oai commented 1 month ago

We're trying to run the command:

bk build new --env FOOBAR=hello=there

with the intention of having the environment variable FOOBAR be set to hello=there, but this code here:

https://github.com/buildkite/cli/blob/80141e2e7563688f60eb3c853bda7f42d5d91134/pkg/cmd/build/new.go#L67-L86

ignores environment variable settings which include more than a single = sign, so I'm not sure that there's an obvious way for me to pass this data in.

Note that this applies both to --env and --envFile.

lizrabuya commented 1 month ago

Thanks for reporting this @top-oai. We'll work to getting this fixed.

mcncl commented 1 month ago

Hey @top-oai!

I think this PR should fix the issue you're having. Apologies for not considering = might be a part of the value, makes total sense for things like GraphQL IDs etc

top-oai commented 1 month ago

Hey @top-oai!

I think this PR should fix the issue you're having. Apologies for not considering = might be a part of the value, makes total sense for things like GraphQL IDs etc

No problem, thanks for the quick fix!