deployer
deployer copied to clipboard
Unable to run commands including {{ }}
- Deployer version: 6.8.0
- Deployment OS: MacOS to Ubuntu
Running a command that includes {{ }}:
task('cleanup', function () {
$containers = run('docker ps --format "{{.Names}}"');
});
it gives this error: Configuration parameter '.Names' does not exist.
Can I escape the command parameters?
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Use a tmp var.
Could you expand on that? I tried this:
task('cleanup', function () {
set(".Names", "{{.Names}}");
$containers = run('docker ps --format "{{.Names}}"');
});
but that causes a segmentation fault
$var = “{{}}”
How does that escape run() templating?
I see. Now Ive got the problem. Let's add a proper escaping to deployer.