Skip to content

Commit cdab6aa

Browse files
committed
add Console::reExecute()
1 parent dc179cf commit cdab6aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Ubiquity/devtools/cmd/Console.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,15 @@ public static function isCancel($answer) {
125125
'z'
126126
]) !== false;
127127
}
128+
129+
/**
130+
* ReExecutes the loaded script.
131+
* @return void
132+
*/
133+
public static function reExecute(): void {
134+
global $argv;
135+
$argv[0]=\realpath($argv[0]);
136+
\system(PHP_BINARY.' '.\implode(' ',$argv));
137+
die();
138+
}
128139
}

0 commit comments

Comments
 (0)