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';
1313import * as fs from 'fs' ;
1414import * as path from 'path' ;
1515import { SemVer } from 'semver' ;
16+ import { Duplex } from 'stream' ;
1617import { isWarningEnabled } from '../utilities/config' ;
1718
1819const packageJson = require ( '../package.json' ) ;
@@ -121,7 +122,21 @@ if ('default' in cli) {
121122 cli = cli [ 'default' ] ;
122123}
123124
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+ } )
125140 . then ( ( exitCode : number ) => {
126141 process . exit ( exitCode ) ;
127142 } )
You can’t perform that action at this time.
0 commit comments