File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-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,10 @@ export const dockerCommand = async (
216217 } ,
217218 ) ;
218219
220+ if ( options . stdin ) {
221+ childProcess . stdin . write ( options . stdin ) ;
222+ }
223+
219224 if ( options . echo ) {
220225 childProcess . stdout . on ( "data" , ( chunk ) => {
221226 process . stdout . write ( chunk . toString ( ) ) ;
@@ -240,6 +245,7 @@ export class Docker {
240245 echo : true ,
241246 env : undefined ,
242247 machineName : undefined ,
248+ stdin : undefined
243249 } ,
244250 ) { }
245251
@@ -253,6 +259,7 @@ export interface IOptions {
253259 currentWorkingDirectory ?: string ;
254260 echo ?: boolean ;
255261 env ?: NodeJS . ProcessEnv ;
262+ stdin ?: string ;
256263}
257264
258265export class Options implements IOptions {
@@ -261,5 +268,6 @@ export class Options implements IOptions {
261268 public currentWorkingDirectory ?: string ,
262269 public echo : boolean = true ,
263270 public env ?: NodeJS . ProcessEnv ,
271+ public stdin ?: string ,
264272 ) { }
265273}
You can’t perform that action at this time.
0 commit comments