mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-04 23:35:40 +08:00
Allow set current working dir
This commit is contained in:
@@ -176,6 +176,12 @@ class WindowsCMakeExecutor extends Executor
|
||||
return implode(' ', array_merge($this->configure_args, $this->getDefaultCMakeArgs()));
|
||||
}
|
||||
|
||||
public function setWorkingDir(string $dir): static
|
||||
{
|
||||
$this->cmd = $this->cmd->cd($dir);
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default CMake args.
|
||||
*/
|
||||
@@ -207,12 +213,12 @@ class WindowsCMakeExecutor extends Executor
|
||||
private function initBuildDir(): void
|
||||
{
|
||||
if ($this->build_dir === null) {
|
||||
$this->build_dir = "{$this->package->getSourceDir()}\\build";
|
||||
$this->build_dir = "{$this->package->getSourceRoot()}\\build";
|
||||
}
|
||||
}
|
||||
|
||||
private function initCmd(): void
|
||||
{
|
||||
$this->cmd = cmd()->cd($this->package->getSourceDir());
|
||||
$this->cmd = cmd()->cd($this->package->getSourceRoot());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user