File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ class CustomOutputModifier implements OutputModifier
66{
77 public function modify (string $ output = '' ): string
88 {
9+ $ endMarker = 'TWEAKPHP_END ' ;
10+ $ position = strpos ($ output , $ endMarker );
11+
12+ if ($ position !== false ) {
13+ $ output = substr ($ output , 0 , $ position );
14+ }
15+
916 // remove only the first tab from each line
1017 return preg_replace ('/^ {2}/m ' , '' , $ output );
1118 }
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ public function execute(string $phpCode): string
3131
3232 $ this ->shell ->addInput ($ phpCode );
3333
34+ if (defined ('PHP_WINDOWS_VERSION_BUILD ' )) {
35+ $ this ->shell ->addInput ("\necho('TWEAKPHP_END'); exit(); " );
36+ }
37+
3438 $ closure = new ExecutionLoopClosure ($ this ->shell );
3539
3640 $ closure ->execute ();
You can’t perform that action at this time.
0 commit comments