question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

depcheck not triggering fail from bashscript-

See original GitHub issue

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.

depcheck --ignores '@cv/package1, package2, package3, @cv/package4'
                    if [ $? -eq 0 ]; then 
                                              #i go forward with my publish-
                        echo "Step-11: Checking Command to execute" 
                    else 
                     echo "Missing Dependencies found. Fix the package.json file and execute this script again."
                        exit 3
                    fi

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 ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
spiraycommented, Dec 18, 2019

@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!

1reaction
fastcodejavacommented, Oct 5, 2016

Yeah, seems like an valid issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

depcheck and npm-check not working - Stack Overflow
I tried specifying --ignore-bin-package=false to depcheck , but that made no difference. The project https://github.com/russellw/ayane is ...
Read more >
depcheck – Linting dependency usage - Tentacle Labs Blog
I want to present you depcheck , a small utility to keep track of your dependency usage. When working with dependencies from NPM, ......
Read more >
depcheck | Yarn - Package Manager
Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless, and...
Read more >
depcheck - npm
depcheck. Depcheck is a tool for analyzing the dependencies in a project to see: how each dependency is used, which dependencies are useless ......
Read more >
dependency-check-cli – Command Line Arguments
jar'); if using an Ant style path it is highly recommended that you use single quotes around the path so that the shell...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found