Crontab breaks on single quotes in either a command or a comment line #4036
Answered
by
silentvick
silentvick
asked this question in
Bugs
Deployer Versionv7.5.12 Target OSUbuntu 22.04 Which PHP version are you using?PHP 7.4 Content of deploy.php or deploy.yamlrequire 'contrib/crontab.php';
after('deploy:success', 'crontab:sync');
add('crontab:jobs', [
// Notice the single quote
'0 0 * * * echo "It\'s deploy time"',
]);
// just run crontab:sync thenSteps to reproduceIf either a command or a comment contains a single quote, the task will fail with shell error. Moreover a standard crontab template already has a help comment that contains single quotes (at least on Ubuntu): Which leads to this error on creating temporary template: Seems like the content is echo-ed without proper escaping, so there might be other errors because of that. |
Answered by
silentvick
Mar 25, 2025
Replies: 2 comments 4 replies
Answer selected by
silentvick
|
Since PR was merged, I'll mark the thread as answered. One question though. Will it be merged into 7.x branch as well or do I need to open a PR against it, what's the process here? We are on PHP7, so can't use the latest version of the package 🤷 |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I went ahead and opened a PR #4042