File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,14 @@ if (require.main === module) {
42
42
const promise = main ( process . argv . slice ( 2 ) , process . stdout , process . stderr ) ;
43
43
44
44
// Error Handling.
45
- promise . catch ( err => {
46
- console . error ( "ERROR:" , err . message ) ; // eslint-disable-line no-console
47
- process . exit ( 1 ) ;
48
- } ) ;
45
+ promise . then (
46
+ ( ) => {
47
+ // I'm not sure why, but maybe the process never exits on Git Bash (MINGW64)
48
+ process . exit ( 0 ) ;
49
+ } ,
50
+ ( err ) => {
51
+ console . error ( "ERROR:" , err . message ) ; // eslint-disable-line no-console
52
+ process . exit ( 1 ) ;
53
+ }
54
+ ) ;
49
55
}
Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ import spawn from "./spawn";
16
16
function detectStreamKind ( stream , std ) {
17
17
return (
18
18
stream == null ? "ignore" :
19
- stream !== std ? "pipe" :
19
+ // `|| !std.isTTY` is needed for the workaround of https://github.com/nodejs/node/issues/5620
20
+ stream !== std || ! std . isTTY ? "pipe" :
20
21
/* else */ stream
21
22
) ;
22
23
}
You can’t perform that action at this time.
0 commit comments