mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 02:58:40 +00:00
Fixed windows execution bug
This commit is contained in:
parent
a02f1cca5d
commit
a7e337b153
|
|
@ -177,7 +177,12 @@ class Repository
|
|||
*/
|
||||
private function run(string $cmd) : array
|
||||
{
|
||||
$cmd = escapeshellarg(Git::getBin()) . ' ' . $cmd;
|
||||
if (strtolower(substr(PHP_OS, 0, 3)) == 'win') {
|
||||
$cmd = 'cd ' . escapeshellarg(dirname(Git::getBin())) . ' && ' . basename(Git::getBin()) . ' -C ' . escapeshellarg($this->path) . ' ' . $cmd;
|
||||
} else {
|
||||
$cmd = escapeshellarg(Git::getBin()) . ' -C ' . escapeshellarg($this->path) . ' ' . $cmd;
|
||||
}
|
||||
|
||||
$pipes = [];
|
||||
$desc = [
|
||||
1 => ['pipe', 'w'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user