From ca13b65022e019eb5525554e6a372c83a1a5415a Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Fri, 14 Mar 2014 00:06:59 +0700 Subject: [PATCH] Change 'cp' command to 'copy' for windows --- PHPCI/Model/Build/LocalBuild.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PHPCI/Model/Build/LocalBuild.php b/PHPCI/Model/Build/LocalBuild.php index 8e6984c6..485376ad 100644 --- a/PHPCI/Model/Build/LocalBuild.php +++ b/PHPCI/Model/Build/LocalBuild.php @@ -45,7 +45,11 @@ class LocalBuild extends Build if (isset($buildSettings['prefer_symlink']) && $buildSettings['prefer_symlink'] === true) { return $this->handleSymlink($builder, $reference, $buildPath); } else { - $builder->executeCommand('cp -Rf "%s" "%s/"', $reference, $buildPath); + $cmd = 'cp -Rf "%s" "%s/"'; + if (IS_WIN) { + $cmd = 'copy /Y "%s" "%s/"'; + } + $builder->executeCommand($cmd, $reference, $buildPath); } return true;