File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { resolve } from '@angular-devkit/core/node';
13
13
import * as fs from 'fs' ;
14
14
import * as path from 'path' ;
15
15
import { SemVer } from 'semver' ;
16
+ import { Duplex } from 'stream' ;
16
17
import { isWarningEnabled } from '../utilities/config' ;
17
18
18
19
const packageJson = require ( '../package.json' ) ;
@@ -121,7 +122,21 @@ if ('default' in cli) {
121
122
cli = cli [ 'default' ] ;
122
123
}
123
124
124
- cli ( { cliArgs : process . argv . slice ( 2 ) } )
125
+ // This is required to support 1.x local versions with a 6+ global
126
+ let standardInput ;
127
+ try {
128
+ standardInput = process . stdin ;
129
+ } catch ( e ) {
130
+ delete process . stdin ;
131
+ process . stdin = new Duplex ( ) ;
132
+ standardInput = process . stdin ;
133
+ }
134
+
135
+ cli ( {
136
+ cliArgs : process . argv . slice ( 2 ) ,
137
+ inputStream : standardInput ,
138
+ outputStream : process . stdout ,
139
+ } )
125
140
. then ( ( exitCode : number ) => {
126
141
process . exit ( exitCode ) ;
127
142
} )
You can’t perform that action at this time.
0 commit comments