mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Parse the target path given to cd to prevent recursive loop.
If cd was given {release_path} as target path, it would attempt to run a command to figure out what the value of {release_path} is, which, in the process, would also want to know the value of {release_path} and so on. The fix simply parses the value as it is given, thus making the result static instead of a closure.
This commit is contained in:
parent
2ee23ada16
commit
f3443a7615
@ -155,7 +155,7 @@ task('deploy:writable', function () {
|
||||
|
||||
$httpUser = run("ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1")->toString();
|
||||
|
||||
cd(env('release_path'));
|
||||
cd('{release_path}');
|
||||
|
||||
if (strpos(run("chmod 2>&1; true"), '+a') !== false) {
|
||||
|
||||
|
@ -173,7 +173,7 @@ function option($name, $shortcut = null, $mode = null, $description = '', $defau
|
||||
*/
|
||||
function cd($path)
|
||||
{
|
||||
env('working_path', $path);
|
||||
env('working_path', env()->parse($path));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user