diff --git a/src/Command/BuiltIn/DeployCommand.php b/src/Command/BuiltIn/DeployCommand.php index a5cc2d5..c932463 100644 --- a/src/Command/BuiltIn/DeployCommand.php +++ b/src/Command/BuiltIn/DeployCommand.php @@ -173,7 +173,7 @@ class DeployCommand extends AbstractCommand return true; } - if ($this->runtime->getWorkingHost()) { + if ($this->runtime->getWorkingHost() !== null) { $output->writeln(sprintf(' Starting %s tasks on host %s:', $this->getStageName(), $this->runtime->getWorkingHost())); } else { $output->writeln(sprintf(' Starting %s tasks:', $this->getStageName())); diff --git a/src/Runtime/Runtime.php b/src/Runtime/Runtime.php index b7b5aec..83a49cc 100644 --- a/src/Runtime/Runtime.php +++ b/src/Runtime/Runtime.php @@ -49,7 +49,7 @@ class Runtime /** * @var string|null The host being deployed to */ - protected $workingHost; + protected $workingHost = null; /** * @var string|null The Release ID @@ -420,7 +420,7 @@ class Runtime } $hostPath = rtrim($this->getEnvOption('host_path'), '/'); - if ($jail && $this->getReleaseId()) { + if ($jail && $this->getReleaseId() !== null) { $cmdDelegate = sprintf('cd %s/releases/%s && %s', $hostPath, $this->getReleaseId(), $cmdDelegate); } elseif ($jail) { $cmdDelegate = sprintf('cd %s && %s', $hostPath, $cmdDelegate); diff --git a/src/Task/BuiltIn/FS/AbstractFileTask.php b/src/Task/BuiltIn/FS/AbstractFileTask.php index fef53fc..c2e4685 100644 --- a/src/Task/BuiltIn/FS/AbstractFileTask.php +++ b/src/Task/BuiltIn/FS/AbstractFileTask.php @@ -59,11 +59,11 @@ abstract class AbstractFileTask extends AbstractTask '%environment%' => $this->runtime->getEnvironment(), ]; - if ($this->runtime->getWorkingHost()) { + if ($this->runtime->getWorkingHost() !== null) { $mapping['%host%'] = $this->runtime->getWorkingHost(); } - if ($this->runtime->getReleaseId()) { + if ($this->runtime->getReleaseId() !== null) { $mapping['%release%'] = $this->runtime->getReleaseId(); }