File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ export const dockerCommand = async (
176176 echo : true ,
177177 env : undefined ,
178178 machineName : undefined ,
179+ stdin : undefined
179180 } ,
180181) => {
181182 let machineconfig = "" ;
@@ -216,6 +217,11 @@ export const dockerCommand = async (
216217 } ,
217218 ) ;
218219
220+ if ( options . stdin ) {
221+ childProcess . stdin . write ( options . stdin ) ;
222+ childProcess . stdin . end ( ) ;
223+ }
224+
219225 if ( options . echo ) {
220226 childProcess . stdout . on ( "data" , ( chunk ) => {
221227 process . stdout . write ( chunk . toString ( ) ) ;
@@ -240,6 +246,7 @@ export class Docker {
240246 echo : true ,
241247 env : undefined ,
242248 machineName : undefined ,
249+ stdin : undefined
243250 } ,
244251 ) { }
245252
@@ -253,6 +260,7 @@ export interface IOptions {
253260 currentWorkingDirectory ?: string ;
254261 echo ?: boolean ;
255262 env ?: NodeJS . ProcessEnv ;
263+ stdin ?: string ;
256264}
257265
258266export class Options implements IOptions {
@@ -261,5 +269,6 @@ export class Options implements IOptions {
261269 public currentWorkingDirectory ?: string ,
262270 public echo : boolean = true ,
263271 public env ?: NodeJS . ProcessEnv ,
272+ public stdin ?: string ,
264273 ) { }
265274}
You can’t perform that action at this time.
0 commit comments