Skip to content

Commit

Permalink
💚 [Debug] Try updating npm on Windows without updating the environmen…
Browse files Browse the repository at this point in the history
…t variable `$PATH`
  • Loading branch information
sounisi5011 committed Mar 13, 2023
1 parent 26a2f08 commit 481b3a0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ jobs:
exec_with_debug npm install --global --force "${packageManager%%+*}"
if [[ '${{ runner.os }}' == 'Windows' ]]; then
# Windows installs global packages to a directory that has lower priority than the default node install so we also need to edit $PATH
# see https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R69
echo "[command]npm config get prefix >> \$GITHUB_PATH"
npm config get prefix >> "${GITHUB_PATH}"
fi
# if [[ '${{ runner.os }}' == 'Windows' ]]; then
# # Windows installs global packages to a directory that has lower priority than the default node install so we also need to edit $PATH
# # see https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R69
# echo "[command]npm config get prefix >> \$GITHUB_PATH"
# npm config get prefix >> "${GITHUB_PATH}"
# fi
echo '::endgroup::'
elif type corepack >/dev/null 2>&1; then
Expand All @@ -211,12 +211,12 @@ jobs:
); then
echo "::group::Old Corepack is detected ( corepack@$(corepack --version 2>/dev/null || echo '[Execution failed; Unknown version]') ). Update this"
exec_with_debug npm install --global --force 'corepack@0.11.2'
if [[ '${{ runner.os }}' == 'Windows' ]]; then
# Windows installs global packages to a directory that has lower priority than the default node install so we also need to edit $PATH
# see https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R69
echo "[command]npm config get prefix >> \$GITHUB_PATH"
npm config get prefix >> "${GITHUB_PATH}"
fi
# if [[ '${{ runner.os }}' == 'Windows' ]]; then
# # Windows installs global packages to a directory that has lower priority than the default node install so we also need to edit $PATH
# # see https://github.com/vercel/turbo/pull/1632/files#diff-b92a3120126a9ffe46d7d5ec3a8496ef1eac951db09e1972fac7c78438e36c42R69
# echo "[command]npm config get prefix >> \$GITHUB_PATH"
# npm config get prefix >> "${GITHUB_PATH}"
# fi
echo '::endgroup::'
fi
rm -rf "${TEST_COREPACK_DIRPATH}"
Expand Down

0 comments on commit 481b3a0

Please sign in to comment.