Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sudo error overriding yarn #242

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ jobs:
exit 1
fi

integration-test-override-yarn:
docker:
- image: cimg/ruby:3.3.5-browsers
steps:
- node/install:
install-yarn: true
node-version: '22.11.0'

integration-test-use-nvmrc-version:
parameters:
os:
Expand Down Expand Up @@ -213,7 +221,10 @@ jobs:
workflows:
test-deploy:
jobs:
- integration-test-reinstall-yarn
- integration-test-override-yarn:
filters: *filters
- integration-test-reinstall-yarn:
filters: *filters
- integration-test-install-specified-version:
filters: *filters
matrix:
Expand Down Expand Up @@ -435,6 +446,7 @@ workflows:
- integration-test-pnpm
- integration-test-reinstall-yarn
- node-yarn-mocha-with-test-result-path-job
- integration-test-override-yarn
- node-yarn-mocha-test-job
- node-yarn-jest-test-job
- node-test-results-file-job
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/install-yarn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ installation_check () {
$SUDO apt-get remove yarn > /dev/null 2>&1 && \
$SUDO apt-get purge yarn > /dev/null 2>&1
OLD_YARN=$(which yarn)
rm "$OLD_YARN"
$SUDO rm "$OLD_YARN"
elif grep Ubuntu /etc/issue > /dev/null 2>&1; then
$SUDO apt-get remove yarn > /dev/null 2>&1 && \
$SUDO apt-get purge yarn > /dev/null 2>&1
OLD_YARN=$(which yarn)
rm "$OLD_YARN"
$SUDO rm "$OLD_YARN"
elif command -v yum > /dev/null 2>&1; then
yum remove yarn > /dev/null 2>&1
fi
Expand Down