Skip to content

Commit 612544b

Browse files
author
nickpape-msft
authored
Don't try to watch process exit if we are getting command line help (microsoft#99)
* don't try to watch process exit if we are getting command line help * lint error
1 parent a46ae0c commit 612544b

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/gulp-core-build",
5+
"comment": "Don't watch process exit if user passed in the -h flag.",
6+
"type": "patch"
7+
}
8+
],
9+
"email": "nickpape@users.noreply.github.com"
10+
}

gulp-core-build/src/index.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,15 @@ function _handleCommandLineArguments(): void {
405405
}
406406

407407
function _handleTasksListArguments(): void {
408-
/* tslint:disable-next-line:no-string-literal */
408+
/* tslint:disable:no-string-literal */
409409
if (args['tasks'] || args['tasks-simple'] || args['T']) {
410-
global['dontWatchExit'] = true; // tslint:disable-line:no-string-literal
410+
global['dontWatchExit'] = true;
411411
}
412+
if (args['h']) {
413+
// we are showing a help command prompt via yargs or ts-command-line
414+
global['dontWatchExit'] = true;
415+
}
416+
/* tslint:enable:no-string-literal */
412417
}
413418

414419
export const clean: IExecutable = new CleanTask();

0 commit comments

Comments
 (0)