Skip to content

Commit 3b59b66

Browse files
committed
Merge pull request #32 from ngoldman/proper-exits
cli: exit 1 when appropriate
2 parents fd3bf3d + 1071505 commit 3b59b66

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44
This change log adheres to [keepachangelog.com](http://keepachangelog.com).
55

6+
## Unreleased
7+
### Fixed
8+
* exit process with code 1 on aborted release or invalid directory
9+
610
## [1.1.7] - 2015-04-07
711
### Fixed
812
* If cli is successful, should exit with code of 0

bin/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function checkDir (workpath) {
8383
if (!pkgExists || !logExists) {
8484
console.log('Must be run in a directory with package.json and CHANGELOG.md')
8585
yargs.showHelp()
86-
process.exit(0)
86+
process.exit(1)
8787
}
8888

8989
authenticate()

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function ghRelease (options, auth, callback) {
5959
if (options.dryRun) process.exit(0)
6060

6161
inquirer.prompt(questions, function (answers) {
62-
if (!answers.confirm) return process.exit(0)
62+
if (!answers.confirm) return process.exit(1)
6363

6464
var checkCommitForm = {
6565
user: releaseOptions.owner,

0 commit comments

Comments
 (0)