From 065ab279e38966eff413057f9ccb420d16256846 Mon Sep 17 00:00:00 2001 From: Adam Malone Date: Mon, 30 Mar 2020 10:26:13 +1100 Subject: [PATCH] Prevents setup command from using project directory if we are in a phar. --- src/Commands/SetupCommand.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Commands/SetupCommand.php b/src/Commands/SetupCommand.php index 4e88216..6771346 100644 --- a/src/Commands/SetupCommand.php +++ b/src/Commands/SetupCommand.php @@ -22,10 +22,12 @@ class SetupCommand extends Tasks */ public function setup(Config $config) { - $configFiles = [ - 'global' => $config->get('config.global'), - 'project' => $config->get('config.project'), - ]; + $configFiles = ['global' => $config->get('config.global')]; + + // Do not include project configuration if this is running in a Phar. + if (!\Phar::running()) { + $configFiles['project'] = $config->get('config.project'); + } foreach ($configFiles as $type => $location) { $this->say(sprintf('Checking %s configuration at %s', $type, $location));