Skip to content

Commit

Permalink
Ensure directory exists before running cd.
Browse files Browse the repository at this point in the history
  • Loading branch information
kporras07 committed Jul 12, 2017
1 parent 6f10141 commit 4975189
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ScriptHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public static function createSymlinks(Event $event, Filesystem $filesystem = nul
}

// Build and execute final command.
$mkdir_cmd = 'mkdir -p ' . $targetDirname;
exec($mkdir_cmd);
$cmd = 'cd ' . $targetDirname . ' && ' . $command . ' ' . $sourceRelativePath . ' ' . basename($targetRelativePath);
exec($cmd);

Expand Down

0 comments on commit 4975189

Please sign in to comment.