From 2e434124437cf6f992d149f6aa1fe033e5894118 Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Tue, 31 Oct 2023 14:32:18 +0000 Subject: [PATCH] fix: aztec-cli handle args with escape sequences For commands like `compute-selector` which take arguments with reserved characters, the bash wrapper script required callers to triple escape characters, e.g. what normally would have been aztec-cli compute-selector foo\(Field\) using the `eval $DOCKER_CMD` approach required: aztec-cli computer-selector foo\\\(Field\\\) Replacing the `eval` with directly running the command fixed it. --- yarn-project/cli/aztec-cli | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/yarn-project/cli/aztec-cli b/yarn-project/cli/aztec-cli index 43eb689f44c..d2ad4384c6d 100755 --- a/yarn-project/cli/aztec-cli +++ b/yarn-project/cli/aztec-cli @@ -145,13 +145,11 @@ fi DOCKER_VOLUME="$DOCKER_VOLUME -v cache:/cache" -DOCKER_CMD="$DOCKER_PATH run \ +$DOCKER_PATH run \ --rm \ --user $(id -u):$(id -g) \ - --workdir \"$PWD\" \ + --workdir "$PWD" \ $DOCKER_HOST \ $DOCKER_ENV \ $DOCKER_VOLUME \ - $CLI_IMAGE:$CLI_VERSION $@ $AZTEC_CLI_EXTRA_ARGS" - -eval "$DOCKER_CMD" + $CLI_IMAGE:$CLI_VERSION $@ $AZTEC_CLI_EXTRA_ARGS