deployphp / deployer

The PHP deployment tool with support for popular frameworks out of the box
https://deployer.org
MIT License
10.41k stars 1.47k forks source link

Add a way to escape {{braces}} so they are not getting replaced in commands #3851

Open bhelm opened 1 week ago

bhelm commented 1 week ago
    run(
        'docker ps --all --format "{{.ID}}\t{{.Names}}"'
    );

I tried to run a command containing {{.ID}} placeholders that are used in the docker compose ps formatting template, but these are picket up by the deployer parse function.

I would suggest to add the posibillity to excape the braces using \, replace the variables and after that replace { to { for the command execution.

That way, i could write it like this:

    run(
        'docker ps --all --format "\{\{.ID\}\}\t\{\{.Names\}\}"'
    );

Thank You.

Upvote & Fund

Fund with Polar