mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-18 13:46:40 +02:00
Update TarGzTask.php
Simpler $sudo cheking conditionals.
This commit is contained in:
parent
1037cabaef
commit
281b1a4d54
|
@ -103,7 +103,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
|||
|
||||
$uploadDirectory = $deployToDirectory;
|
||||
|
||||
if ($sudo === true) {
|
||||
if ($sudo) {
|
||||
$uploadDirectory = "/tmp";
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ class TarGzTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
|||
. $uploadDirectory;
|
||||
$result = $this->runCommandLocal($command) && $result;
|
||||
|
||||
if ($sudo === true) {
|
||||
if ($sudo) {
|
||||
$tarGzFileName = $remoteTarGz . '.tar.gz';
|
||||
$command = $this->getReleasesAwareCommand('mv /tmp/' . $tarGzFileName . ' ' . $deployToDirectory);
|
||||
$result = $this->runCommandRemote($command) && $result;
|
||||
|
|
Loading…
Reference in a new issue