From 5cb37f3291503189ed20ae6d1b53e4b4550c0f69 Mon Sep 17 00:00:00 2001 From: Claus Due Date: Sat, 12 Apr 2014 13:52:26 +0200 Subject: [PATCH] Cross-platform safe copy in Plugin.CopyBuild Rather than using `xargs` which behaves differently on BSD and Linux, it's safer to use the straight `cp`. We lose the output of which files were copied - but I'd be more than happy to add this as a separate command to list which files were copied and which were ignored. --- PHPCI/Plugin/CopyBuild.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPCI/Plugin/CopyBuild.php b/PHPCI/Plugin/CopyBuild.php index c06408b8..39d41e3f 100644 --- a/PHPCI/Plugin/CopyBuild.php +++ b/PHPCI/Plugin/CopyBuild.php @@ -43,7 +43,7 @@ class CopyBuild implements \PHPCI\Plugin return false; } - $cmd = 'mkdir -p "%s" && ls -1a "%s"* | xargs -r -t "%s/"'; + $cmd = 'mkdir -p "%s" && cp -R "%s" "%s"'; $success = $this->phpci->executeCommand($cmd, $this->directory, $build, $this->directory); if ($this->ignore) {