From 77367c4cd9f7f22759863f36af77a4a692461bf3 Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Thu, 25 Feb 2016 14:38:07 +1100 Subject: [PATCH] Adds windows support to october:util git pull --- modules/system/console/OctoberUtil.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/system/console/OctoberUtil.php b/modules/system/console/OctoberUtil.php index 8a3326912..cfea8587d 100644 --- a/modules/system/console/OctoberUtil.php +++ b/modules/system/console/OctoberUtil.php @@ -230,15 +230,15 @@ class OctoberUtil extends Command } /** - * @todo This command is not compatible with Windows + * This command requires the git binary to be installed. */ protected function utilGitPull() { foreach (File::directories(plugins_path()) as $authorDir) { foreach (File::directories($authorDir) as $pluginDir) { if (!File::isDirectory($pluginDir.'/.git')) continue; - $exec = 'cd ' . $pluginDir . ';'; - $exec .= 'git pull 2>&1;'; + $exec = 'cd ' . $pluginDir . ' && '; + $exec .= 'git pull 2>&1'; echo 'Updating plugin: '. basename(dirname($pluginDir)) .'.'. basename($pluginDir) . PHP_EOL; echo shell_exec($exec); } @@ -246,8 +246,8 @@ class OctoberUtil extends Command foreach (File::directories(themes_path()) as $themeDir) { if (!File::isDirectory($themeDir.'/.git')) continue; - $exec = 'cd ' . $themeDir . ';'; - $exec .= 'git pull 2>&1;'; + $exec = 'cd ' . $themeDir . ' && '; + $exec .= 'git pull 2>&1'; echo 'Updating theme: '. basename($themeDir) . PHP_EOL; echo shell_exec($exec); }