mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-07 13:08: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
|
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 = [];
|
$pipes = [];
|
||||||
$desc = [
|
$desc = [
|
||||||
1 => ['pipe', 'w'],
|
1 => ['pipe', 'w'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user