Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set a build-arg containing = from the command line #410

Closed
mexicat opened this issue May 5, 2021 · 2 comments
Closed

Can't set a build-arg containing = from the command line #410

mexicat opened this issue May 5, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@mexicat
Copy link

mexicat commented May 5, 2021

Describe the bug
I have a build arg I need to pass to fly deploy as part of a CI process. This build arg contains the equal symbol =. No matter how I escape it, flyctl refuses to accept it:

$ fly deploy --build-arg MY_ARG="some=value"
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Error invalid build-arg: 'MY_ARG=some=value': must be in the format NAME=VALUE
$ fly deploy --build-arg MY_ARG="some\=value"
==> Validating app configuration
--> Validating app configuration done
Services
TCP 80/443 ⇢ 8080
Error invalid build-arg: 'MY_ARG=some\=value': must be in the format NAME=VALUE

Putting the build arg in fly.toml makes it work, but I don't want to commit this build arg.

The cause seems to be these lines of validation in the source code, that naively check for the amount of =s:

parts := strings.Split(arg, "=")
if len(parts) != 2 {
return nil, fmt.Errorf("'%s': must be in the format NAME=VALUE", arg)
}

Unfortunately I don't know enough Go to be able to submit a pull request.

@mexicat mexicat added the bug Something isn't working label May 5, 2021
@michaeldwan
Copy link
Member

@mexicat this should be fixed now, sorry about that

@mexicat
Copy link
Author

mexicat commented May 6, 2021

Whoa, that was quick! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants