b4n left a comment (geany/geany#4611)

The issue is that at least for build commands, we currently explicitly use a 
shell, which allows complicated constructs. Not losing this while replacing 
placeholders that can contain arbitrary characters means we have to be 
extremely careful on how we escape things.

A simpler solution could be propagating the placeholders as environment 
variables so the shell can do what it wants with it, but that means breaking 
compatibility with existing legitimate build commands.  The mentioned PR tries 
to be clever and parse the command as a Bourne shell construct to keep track of 
quoting state, and properly open/close quotes as needed.  I believe I did spot 
a corner case issue with this even, so it *is* not trivial to pull off -- and 
that's without Windows cmd.exe support.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/4611#issuecomment-4855299193
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/issues/4611/[email protected]>

Reply via email to