Skip to content

Commit 330b7d0

Browse files
committed
Avoid clash with --branch argv in Node 10
1 parent a769831 commit 330b7d0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

gulp/utils/options.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ options.date = git('log -1 --pretty=format:%ad');
2424
options.branch = git('rev-parse --abbrev-ref HEAD');
2525

2626
// If a specific branch is requested, quit without errors if we don't match.
27-
if (argv.branch && argv.branch !== options.branch) {
28-
console.log('Branch "' + options.branch + '" does not match "' +
29-
argv.branch + '". There is nothing to do here.');
27+
var ensureBranch = argv['ensure-branch'];
28+
if (ensureBranch && ensureBranch !== options.branch) {
29+
console.log('Branch "' + options.branch + '" does not match requested "' +
30+
ensureBranch + '". There is nothing to do here.');
3031
process.exit(0);
3132
}
3233

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"main": "dist/paper-full.js",
1414
"types": "dist/paper.d.ts",
1515
"scripts": {
16-
"precommit": "gulp jshint --branch develop",
17-
"prepush": "gulp test --branch develop",
16+
"precommit": "gulp jshint --ensure-branch develop",
17+
"prepush": "gulp test --ensure-branch develop",
1818
"build": "gulp build",
1919
"dist": "gulp dist",
2020
"zip": "gulp zip",

0 commit comments

Comments
 (0)