From 09dbc2faa9de251148beef572350f7577261272f Mon Sep 17 00:00:00 2001 From: armandomontanez Date: Wed, 8 Nov 2023 13:34:41 -0800 Subject: [PATCH] Suppress output of `cd` in bootstrap script (#30327) Changes bootstrap.sh to redirect the output of a `cd` command to /dev/null. Usually `cd` does not produce output, but if a user has modified CDPATH it may decide to echo the path that was navigated to. This behavior was breaking bootstrap in very difficult to debug ways. --- scripts/setup/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup/bootstrap.sh b/scripts/setup/bootstrap.sh index 57864b3b410e5e..1b813216222efe 100644 --- a/scripts/setup/bootstrap.sh +++ b/scripts/setup/bootstrap.sh @@ -66,7 +66,7 @@ _bootstrap_or_activate() { local _BOOTSTRAP_NAME="${_BOOTSTRAP_PATH##*/}" local _BOOTSTRAP_DIR="${_BOOTSTRAP_PATH%/*}" # Strip off the 'scripts[/setup]' directory, leaving the root of the repo. - _CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." && pwd)" + _CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." > /dev/null && pwd)" local _CONFIG_FILE="scripts/setup/environment.json"