-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: add engines
and cwd
options
#37
Conversation
@@ -41,7 +46,7 @@ require('yargs') | |||
}) | |||
}).catch(e => { | |||
console.error(e) | |||
process.exitCode = e.code || 1 | |||
process.exitCode ||= e.code || 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, while I think I agree with this change it actually makes me wonder if this should instead handle process.exit
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could, sure - but this way it will still exit the same, except that it’ll preserve a preexisting nonzero exit code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's why I was on board with the change. It just got me thinking about the other thing. If something sets and exit code but doesn't exit I always feel like that is an "action at a distance" which I dont like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i 100% agree but long ago node shifted into "set the exit code" as idiomatic instead of "exit with a code", and i've given up fighting it :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, interesting. I would love to read more about that shift. Anyway, I didn't want to block on this either way. Seems like this is good to merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I am thinking is that we should start adding better cli docs to the readme. Would you be able to add some for this new flag? I will also open a few PRs better describing the use cases and features separately.
No description provided.