From 23154264c69a598f15db507668b554429f66300e Mon Sep 17 00:00:00 2001 From: Loris Leiva Date: Sun, 5 Apr 2020 17:15:32 +0100 Subject: [PATCH] Fix array options bug --- src/LaravelDeployer/Commands/BaseCommand.php | 8 ++++---- tests/Strategies/BasicTest.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LaravelDeployer/Commands/BaseCommand.php b/src/LaravelDeployer/Commands/BaseCommand.php index 4674a1a..1ca8f1a 100644 --- a/src/LaravelDeployer/Commands/BaseCommand.php +++ b/src/LaravelDeployer/Commands/BaseCommand.php @@ -11,7 +11,7 @@ class BaseCommand extends Command { use ParsesCliParameters; - + protected $parameters; protected $providedFile; protected $providedStrategy; @@ -37,7 +37,7 @@ public function __construct() if ($this->useDeployerOptions) { $this->signature .= $deployerOptions; } - + parent::__construct(); } @@ -49,7 +49,7 @@ public function dep($command) $this->providedStrategy = $this->parameters->pull('--strategy'); // Force Ansi mode if not specified. - if ($this->parameters->intersect(['--ansi', '--no-ansi'])->isEmpty()) { + if (! $this->parameters->contains('--ansi') && ! $this->parameters->contains('--no-ansi')) { $this->parameters->push('--ansi'); } @@ -94,7 +94,7 @@ public function getConfigFile() ); } } - + public function getCustomDeployFile() { if (! $configFile = $this->getConfigFile()) { diff --git a/tests/Strategies/BasicTest.php b/tests/Strategies/BasicTest.php index 7f19c0a..3c9fefc 100644 --- a/tests/Strategies/BasicTest.php +++ b/tests/Strategies/BasicTest.php @@ -32,4 +32,4 @@ function a_basic_deployment_should_execute_all_default_tasks() $this->assertStringContainsString('Successfully deployed', $output); $this->assertSuccessfulDeployment(); } -} \ No newline at end of file +}