Why is it '-h' and not '-d'? #3693
Unanswered
clpol
asked this question in
Help needed
Replies: 1 comment
-
The |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
when running deployer in a bitbucket I got the error:
The "release_path" (/usr/home/peter/public_html/deployment/staging/release) does not exist.
It comes from here:
set('release_path', function () { $releaseExists = test('[ -h {{deploy_path}}/release ]'); if ($releaseExists) { $link = run("readlink {{deploy_path}}/release"); return substr($link, 0, 1) === '/' ? $link : get('deploy_path') . '/' . $link; } else { throw new Exception(parse('The "release_path" ({{deploy_path}}/release) does not exist.')); } });
If I execute this on the deployment server:
if [ -h /usr/home/peter/public_html/deployment/staging/release ]; then echo +right; fi
I got an empty answer because that is a folder and not a file.
If I execute this instead:
if [ -d /usr/home/peter/public_html/deployment/staging/release ]; then echo +right; fi
I got a string back and the 'release_path' can be set.
Probably the '-h' is wrong. It should be a 'd' to check if the directory exist and not '-h' to check if the file exist or is a symbolic link
What do you think?
Altogether I wonder why here is a 'release' folder. All deployed files and folders are in the 'releases' folder. In the deployer documentation only a 'releases' folder is mentioned.
Beta Was this translation helpful? Give feedback.
All reactions