EndangeredMassa / npub

publisher for node.js projects
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Better `isClean` check #28

Closed jkrems closed 9 years ago

jkrems commented 9 years ago

https://github.com/EndangeredMassa/npub/blob/14c6569e95cf7a683335d4877e9f00260c44648d/src/git.coffee#L10-L14

The better check is:

EndangeredMassa commented 9 years ago

To simplify this to an exit code, how about [[ -n $(git status --untracked-files=all --porcelain) ]] && exit 1 || exit 0?

jkrems commented 9 years ago

[[ -z $(git status --untracked-files=all --porcelain) ]]? Though I really think printing out the list of files as part of a nice error message might be helpful.

EndangeredMassa commented 9 years ago

That's true. We should print out the list.