-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
depcheck not triggering fail from bashscript- #171
Comments
Yeah, seems like an valid issue. |
@SameerSiddiqui Did you resolve your problem? It sounds like not a problem from depcheck side. |
I'm unable to reproduce this today -- please feel free to reopen an issue if you continue to see this! |
@mnkhouri This still doesn't work for me. This is my script - #!/bin/bash
npx depcheck
if [[ $? == 1 ]]; then
exit 1
else
echo "All of the dependencies are up to date!!!"
fi And this is the output -
Any ideas? |
The error code is not 1 but 255 (-1) |
@rumpl thanks for the quick response, that doesn't seem to be the case, to simplify it, when I run npx depcheck
echo $? I get -
|
Just did the same:
|
You have missing dependencies, maybe that is why. Can you test it again where you only have unused deps? |
|
No idea why it's 0 for you... |
Hmm, I'll play around with it a little more |
Please do write here what you find, would like to know |
@rumpl I figured out what the issue is, I was using Git Bash for windows. I had a colleague run the same script on MacOs and he got the 255. Thanks! |
Thanks! I wonder why git bash is doing that... |
I have a bashscript which executes git/grunt commands automatically, checks for outdated packages and updates/publishes/deploys the app on npm and git.
i want to introduce depcheck in my script so i did the following.
But bash is not detecting if depcheck command has failed. if i assign the depcheck command to variable i do get result but why isn't bash detecting it automatically with$? -eq 0 i have many grunt commands like jshint- and i check them with if [ $ ? -eq 0 ]; and it works.
Am i doing something wrong or this feature is not available with depcheck ?
The text was updated successfully, but these errors were encountered: