mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-17 21:26:40 +02:00
[FIX] Fix linked folder creation
This commit is contained in:
parent
ac36fb29d5
commit
bd5822ea0a
|
@ -61,10 +61,9 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
$linkedEntities = array_merge(
|
||||
$this->getParameter(self::LINKED_FILES, array()),
|
||||
$this->getParameter(self::LINKED_FOLDERS, array())
|
||||
);
|
||||
$linkedFiles = $this->getParameter(self::LINKED_FILES, array());
|
||||
$linkedFolders = $this->getParameter(self::LINKED_FOLDERS, array());
|
||||
$linkedEntities = array_merge($linkedFiles, $linkedFolders);
|
||||
|
||||
if (empty($linkedEntities)) {
|
||||
throw new SkipException('No files and folders configured for sym-linking.');
|
||||
|
@ -83,7 +82,7 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
|
|||
} else {
|
||||
$target = $sharedFolderPath . '/' . $entityPath;
|
||||
}
|
||||
$command = 'mkdir -p ' . escapeshellarg(dirname($target));
|
||||
$command = 'mkdir -p ' . escapeshellarg(in_array($ePath, $linkedFolders) ? $target : dirname($target));
|
||||
$this->runCommandRemote($command);
|
||||
$command = 'ln -nfs ' . escapeshellarg($target) . ' ' . escapeshellarg($currentCopy . '/' . $entityPath);
|
||||
$this->runCommandRemote($command);
|
||||
|
|
Loading…
Reference in a new issue