File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -332,11 +332,14 @@ export const sandboxExecCommand = new Command<SandboxContext>()
332332 const child = await sandbox . spawn ( "bash" , {
333333 cwd : options . cwd ,
334334 args : [ "-c" , command . join ( " " ) ] ,
335+ stdin : "piped" ,
335336 stdout : options . quiet ? "null" : "inherit" ,
336337 stderr : options . quiet ? "null" : "inherit" ,
337338 } ) ;
338339
339- const status = await child . status ;
340+ const write = Deno . stdin . readable . pipeTo ( child . stdin ! ) ;
341+
342+ const [ status ] = await Promise . all ( [ child . status , write ] ) ;
340343 Deno . exit ( status . code ) ;
341344 } ) ;
342345
@@ -398,11 +401,14 @@ export const sandboxRunCommand = new Command<SandboxContext>()
398401 const child = await sandbox . spawn ( "bash" , {
399402 cwd : options . cwd ,
400403 args : [ "-c" , command . join ( " " ) ] ,
404+ stdin : "piped" ,
401405 stdout : options . quiet ? "null" : "inherit" ,
402406 stderr : options . quiet ? "null" : "inherit" ,
403407 } ) ;
404408
405- const status = await child . status ;
409+ const write = Deno . stdin . readable . pipeTo ( child . stdin ! ) ;
410+
411+ const [ status ] = await Promise . all ( [ child . status , write ] ) ;
406412 Deno . exit ( status . code ) ;
407413 } ) ;
408414
You can’t perform that action at this time.
0 commit comments