Skip to content

Commit 65cec76

Browse files
committed
Fix argument passing
The builder.docker-opts and builder.platform arguments didn't work. The switch and its values were added to the builder_instance_args array as a single element, but the switch should be one element and its values the another. Otherwise it produces an invalid parameter when passed to the docker commands and errors are thrown.
1 parent 4ac4d6d commit 65cec76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hooks/pre-command

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ if [[ "${builder_create}" == "true" ]]; then
4141

4242
driver_opt="$(plugin_read_config BUILDER_DRIVER_OPT "")"
4343
if [[ -n "${driver_opt}" ]]; then
44-
builder_instance_args+=("--driver-opt ${driver_opt}")
44+
builder_instance_args+=("--driver-opt" "${driver_opt}")
4545
fi
4646

4747
builder_platform="$(plugin_read_config BUILDER_PLATFORM "")"
4848
if [[ -n "${builder_platform}" ]]; then
49-
builder_instance_args+=("--platform ${builder_platform}")
49+
builder_instance_args+=("--platform" "${builder_platform}")
5050
fi
5151

5252
remote_address="$(plugin_read_config BUILDER_REMOTE_ADDRESS "")"

0 commit comments

Comments
 (0)