-
Notifications
You must be signed in to change notification settings - Fork 333
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
ncu --doctor shows error with prepare script #1362
Comments
Hi, thanks for reporting. I'd like to better understand your use case, and then see what makes sense for npm-check-updates to support. Why does |
Here's a repo that reproduces the issue: https://github.com/adamhl8/ncu-1362 I'm running The prepare script works fine normally. It only fails when executed under ncu. I haven't been able to figure out why. |
Thanks. On my machine (OSX), the test script in the repo you provided is failing rather than the prepare script. It fails on the sed command (even without running ncu). So I'm not sure if that properly reproduces your original issue. raine[ncu-1362]% npm test
> [email protected] test
> vitest run && sed -i 's|expect(true)|expect(true).toBeFalsy()|' ./src/__tests__/index.test.tsx
RUN v0.29.8 /Users/raine/projects/ncu-1362
✓ src/__tests__/index.test.tsx (1)
Test Files 1 passed (1)
Tests 1 passed (1)
Start at 19:33:46
Duration 688ms (transform 45ms, setup 0ms, collect 23ms, tests 3ms)
sed: 1: "./src/__tests__/index.t ...": invalid command code .
raine[ncu-1362]% echo $?
1 |
Sorry, I should have specified. That sed command has nothing to do with the issue itself and is not in the actual project I'm having this issue with. It's there because I need the test to pass initially so
Edit: I changed the sed command in the repo to work with the default macOS sed. |
Thanks! I was able to successfully reproduce it. Internally, the options I have published a fix to |
That fixed it. Thank you! |
npm-check-updates
node >= 14.14
Related: #1170
Steps to Reproduce
prepare
script like:hustky install hooks
ncu -d -u
Current Behavior
For every dependency that ncu checks, I get an error about the prepare script.
Expected Behavior
I don't think ncu should run the prepare script by default, it should be opt-in (maybe with a
--prepare
flag or something). But as that would be potentially breaking for people, maybe just a flag to opt-out would be fine too.The text was updated successfully, but these errors were encountered: