Enhance Windows support by updating artifact configuration and improving extraction logic

This commit is contained in:
crazywhalecc
2025-12-11 11:35:12 +08:00
parent dc05ad23c9
commit 2080407283
21 changed files with 382 additions and 181 deletions

View File

@@ -33,7 +33,7 @@ class UnixShell extends Shell
$original_command = $cmd;
$this->logCommandInfo($original_command);
$this->last_cmd = $cmd = $this->getExecString($cmd);
$this->passthru($cmd, $this->console_putput, $original_command, capture_output: false, throw_on_error: true);
$this->passthru($cmd, $this->console_putput, $original_command, cwd: $this->cd);
return $this;
}
@@ -71,7 +71,7 @@ class UnixShell extends Shell
}
$cmd = $this->getExecString($cmd);
$this->logCommandInfo($cmd);
$result = $this->passthru($cmd, $this->console_putput, $cmd, capture_output: true, throw_on_error: false);
$result = $this->passthru($cmd, $this->console_putput, $cmd, capture_output: true, throw_on_error: false, cwd: $this->cd);
$out = explode("\n", $result['output']);
return [$result['code'], $out];
}
@@ -83,9 +83,6 @@ class UnixShell extends Shell
if (!empty($env_str)) {
$cmd = "{$env_str} {$cmd}";
}
if ($this->cd !== null) {
$cmd = 'cd ' . escapeshellarg($this->cd) . ' && ' . $cmd;
}
return $cmd;
}
}