entrykit icon indicating copy to clipboard operation
entrykit copied to clipboard

Trouble quoting arguments to codep commands

Open tilgovi opened this issue 9 years ago • 2 comments

With a command like codep <script with flags> <other script> I could not figure out how to get things to behave correctly when the flags required quoting.

For instance, with codep "consul-template -template '/etc/nginx/conf.d/services.conf.ctmpl:/etc/nginx/conf.d/services.conf:nginx -s reload'" I could not for the life of me figure out the quoting that would work correctly. Part of the issue might be that the ENTRYPOINT from Dockerfile makes this even more complicated, but I haven't tried codep directly yet.

I ended up just using an HCL file so I wouldn't need to quote the spaces around "nginx -s reload".

tilgovi avatar Feb 02 '16 18:02 tilgovi

So that example with consul-template doesn't work? Yes, the entrypoint Dockerfile syntax complicates things, but it should too much. That said, that's actually why I sometimes prefer the ENV approach for defining entrykit commands.

progrium avatar Feb 02 '16 19:02 progrium

I couldn't manage any working combination of double, single, or escaped quotes of either type when I tried to do that in an ENTRYPOINT.

It's fine. For now I'm just pointing to an HCL file instead.

I'll test codep directly to see whether it handles things correctly on its own and close this or offer a documentation PR if that helps. Just wanted to dump current state from my brain.

On Tue, Feb 2, 2016, 11:19 Jeff Lindsay [email protected] wrote:

So that example with consul-template doesn't work? Yes, the entrypoint Dockerfile syntax complicates things, but it should too much. That said, that's actually why I sometimes prefer the ENV approach for defining entrykit commands.

— Reply to this email directly or view it on GitHub https://github.com/progrium/entrykit/issues/6#issuecomment-178768245.

tilgovi avatar Feb 02 '16 20:02 tilgovi