Skip to content

Commit 09dbc2f

Browse files
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.
1 parent bee205b commit 09dbc2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/setup/bootstrap.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _bootstrap_or_activate() {
6666
local _BOOTSTRAP_NAME="${_BOOTSTRAP_PATH##*/}"
6767
local _BOOTSTRAP_DIR="${_BOOTSTRAP_PATH%/*}"
6868
# Strip off the 'scripts[/setup]' directory, leaving the root of the repo.
69-
_CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." && pwd)"
69+
_CHIP_ROOT="$(cd "${_BOOTSTRAP_DIR%/setup}/.." > /dev/null && pwd)"
7070

7171
local _CONFIG_FILE="scripts/setup/environment.json"
7272

0 commit comments

Comments
 (0)