Skip to content

Commit

Permalink
fix: aztec-cli handle args with escape sequences
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexghr committed Nov 2, 2023
1 parent 98f439a commit 2e43412
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions yarn-project/cli/aztec-cli
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2e43412

Please sign in to comment.