diff --git a/src/Tasks/Build.php b/src/Tasks/Build.php index 293a07c..fcf02f8 100644 --- a/src/Tasks/Build.php +++ b/src/Tasks/Build.php @@ -53,7 +53,7 @@ public function run() if (is_dir($this->params['base'] . "\dist\current")) { rmdir($this->params['base'] . "\dist\current"); } - $this->taskExec('mklink /J ' . $this->params['base'] . '\dist\current ' . $this->getWindowsPath($this->getBuildFolder())) + $this->taskExec('mklink /J "' . $this->params['base'] . '\dist\current" "' . $this->getWindowsPath($this->getBuildFolder()) . '"') ->run(); } else { if (is_dir($this->params['base'] . "/dist/current")) { diff --git a/src/Tasks/Deploy/Package.php b/src/Tasks/Deploy/Package.php index 2533fa7..9f94cb3 100644 --- a/src/Tasks/Deploy/Package.php +++ b/src/Tasks/Deploy/Package.php @@ -97,10 +97,10 @@ public function run() // Create symlink to current folder if ($this->isWindows()) { - if (is_dir($this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip")) { - rmdir($this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip"); + if (is_file($this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip")) { + unlink($this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip"); } - $this->taskExec('mklink /J ' . $this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip" . ' ' . $this->getWindowsPath($this->target)) + $this->taskExec('mklink /H "' . $this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip" . '" "' . $this->getWindowsPath($this->target) . '"') ->run(); } else { if (is_dir($this->params['base'] . "\dist\pkg-" . $this->getExtensionName() . "-current.zip")) {