Add execInDir function
This commit is contained in:
@ -17,3 +17,8 @@ function line(string $line): void
|
|||||||
line($line);
|
line($line);
|
||||||
exit($code);
|
exit($code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function execInDirectory(string $dir, string $command): ?string
|
||||||
|
{
|
||||||
|
return shell_exec(sprintf('cd %s && %s', $dir, $command));
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user