File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ if ( process.argv.includes( '--coverage-html' ) ) {
1414 process . env . LOCAL_PHP_XDEBUG_MODE = 'coverage' ;
1515}
1616
17+ // Add --no-TTY (-T) arg after exec and run commands when STDIN is not a TTY.
18+ const dockerCommand = process . argv . slice ( 2 ) ;
19+ if ( [ 'exec' , 'run' ] . includes ( dockerCommand [ 0 ] ) && ! process . stdin . isTTY ) {
20+ dockerCommand . splice ( 1 , 0 , '--no-TTY' ) ;
21+ }
22+
1723// Execute any Docker compose command passed to this script.
1824const returns = spawnSync (
1925 'docker' ,
@@ -22,7 +28,7 @@ const returns = spawnSync(
2228 ...composeFiles
2329 . map ( ( composeFile ) => [ '-f' , composeFile ] )
2430 . flat ( ) ,
25- ...process . argv . slice ( 2 ) ,
31+ ...dockerCommand ,
2632 ] ,
2733 { stdio : 'inherit' }
2834) ;
You can’t perform that action at this time.
0 commit comments