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

test: make a test more forgiving for systems with non-standard bash and sh paths #1144

Merged
merged 2 commits into from Dec 7, 2023

Conversation

skeet70
Copy link
Contributor

@skeet70 skeet70 commented Dec 4, 2023

test: make a test more forgiving for systems with non-standard bash and sh paths

Edit from @nfischer: this was originally to address #1143, however it appears that bug was fixed in Node.js 21.4 instead. Original PR description below:


By adding a w flag to the write call. Also made a test more forgiving so it passes on systems that have non-standard bash and sh binary paths.

This fixes #1143 .

By adding a [`w` flag to the write
call](nodejs/node#50989). Also made a test
more forgiving so it passes on systems that have non-standard `bash` and
`sh` binary paths.
@nfischer
Copy link
Member

nfischer commented Dec 6, 2023

I think the 'w' flag bug was fixed in nodejs itself: nodejs/node#50990. Can you double check if the fix in node 21.4 is sufficient?

I'm happy to accept the bashPath fix though.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78ed036) 97.27% compared to head (fdcd469) 97.27%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1144   +/-   ##
=======================================
  Coverage   97.27%   97.27%           
=======================================
  Files          36       36           
  Lines        1360     1360           
=======================================
  Hits         1323     1323           
  Misses         37       37           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skeet70
Copy link
Contributor Author

skeet70 commented Dec 6, 2023

Yep, looks like 21.4 works, I'll remove that from the PR.

Node regression fixed by `21.4`
@nfischer nfischer mentioned this pull request Dec 7, 2023
@nfischer nfischer changed the title Fix writeFileSync regression in Node 21 test: make a test more forgiving for systems with non-standard bash and sh paths Dec 7, 2023
@nfischer nfischer added the test label Dec 7, 2023
@nfischer
Copy link
Member

nfischer commented Dec 7, 2023

Thanks for the fix! I updated the PR title and description since the 'w' flag change is now removed. I'll merge this if it passes CI testing.

@nfischer nfischer merged commit 85dd472 into shelljs:master Dec 7, 2023
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exec failure on Node 21
2 participants