From b2240104b45a09a940d980d987b5c4688b415c19 Mon Sep 17 00:00:00 2001 From: Corpsee Date: Tue, 18 Mar 2014 23:58:23 +0700 Subject: [PATCH] Fixed rm for windows --- PHPCI/Builder.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index ba6d2e3a..6f04c9d8 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -216,7 +216,12 @@ class Builder implements LoggerAwareInterface // Clean up: $this->buildLogger->log('Removing build.'); - shell_exec(sprintf('rm -Rf "%s"', $this->buildPath)); + + $cmd = 'rm -Rf "%s"'; + if (IS_WIN) { + $cmd = 'deltree /Y "%s"'; + } + $this->executeCommand($cmd, $this->buildPath); // Update the build in the database, ping any external services, etc. $this->build->sendStatusPostback();