-
Notifications
You must be signed in to change notification settings - Fork 152
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
Version 2.2.0 ignores quotation marks in input parameter "driver-opts" #173
Comments
Looks related to #165. Not sure why it behaves like this now as quotes are still relaxed when parsing inputs: setup-buildx-action/src/context.ts Line 131 in c74574e
With 2.1.0, following args are used with exec command: setup-buildx-action/src/main.ts Line 71 in c74574e
With 2.2.0:
So yes with Looking at the toolkit api, args passed to exec are not quoted correctly: https://github.com/actions/toolkit/blob/9b58167dc9923ca0399b2451f4b3b2c6d4f25f3b/packages/exec/src/toolrunner.ts#L71-L77, that's sad... I guess that's because they use So there are actually two issues here. I will take a look, thanks for your feedback. |
@crazy-max Regarding quotes in
is equivalent to:
In this example, we need to enclose the second key-value pair by quotes to prevent CSV reader from splitting the value of the second KV. |
Don't think that's the issue, https://pkg.go.dev/github.com/spf13/pflag#StringArray
https://pkg.go.dev/github.com/spf13/pflag#StringSlice
|
Oh the error message comes from here actually: https://github.com/docker/buildx/blob/ac85f590ba7d4511f16684cc853a67538bf97ed9/commands/create.go#L328-L339 I guess the csv reader should not interpret commas. This looks also linked to docker/buildx#617: Here
Should be
..as But the
It should return instead:
Same in your case where:
will return
instead of
|
Behaviour
Since version v.2.2.0,
docker/setup-buildx-action
does not pass quotation marks in input paramdriver-opts
to command line arguments ofdocker buildx create
.Steps to reproduce this issue
Expected behaviour
In both versions, value of
--driver-opt
should be enclosed by double quotes like--driver-opt "env.no_proxy=localhost,127.0.0.1,.mydomain"
Actual behaviour
As you can see, the value of
--driver-opt
is not enclosed by"
in the execution of v2.2.0.Configuration
The text was updated successfully, but these errors were encountered: