Skip to content

Commit

Permalink
Suppress output of cd in bootstrap script (#30327)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
armandomontanez authored Nov 8, 2023
1 parent bee205b commit 09dbc2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setup/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 09dbc2f

Please sign in to comment.