mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-24 09:22:14 +02:00
[Nostromo] Allow to override Rsync flags
This commit is contained in:
parent
3c21cfcce9
commit
90f122f0ad
|
@ -33,6 +33,7 @@ class RsyncTask extends AbstractTask
|
||||||
|
|
||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
|
$flags = $this->runtime->getConfigOptions('rsync', '-avz');
|
||||||
$user = $this->runtime->getEnvironmentConfig('user');
|
$user = $this->runtime->getEnvironmentConfig('user');
|
||||||
$host = $this->runtime->getWorkingHost();
|
$host = $this->runtime->getWorkingHost();
|
||||||
$hostPath = rtrim($this->runtime->getEnvironmentConfig('host_path'), '/');
|
$hostPath = rtrim($this->runtime->getEnvironmentConfig('host_path'), '/');
|
||||||
|
@ -43,7 +44,7 @@ class RsyncTask extends AbstractTask
|
||||||
}
|
}
|
||||||
|
|
||||||
$excludes = $this->getExcludes();
|
$excludes = $this->getExcludes();
|
||||||
$cmdRsync = sprintf('rsync -avz %s ./ %s@%s:%s', $excludes, $user, $host, $targetDir);
|
$cmdRsync = sprintf('rsync %s %s ./ %s@%s:%s', $flags, $excludes, $user, $host, $targetDir);
|
||||||
|
|
||||||
/** @var Process $process */
|
/** @var Process $process */
|
||||||
$process = $this->runtime->runLocalCommand($cmdRsync, 600);
|
$process = $this->runtime->runLocalCommand($cmdRsync, 600);
|
||||||
|
|
Loading…
Reference in a new issue