Unable to use arguments containing spaces in --post-hook
hermlon opened this issue · 1 comments
hermlon commented
traefik-certs-dumper/hook/hook.go
Lines 31 to 32 in 0ad349d
Because the
string.Fields
function splits at every single space it is impossible to execute a command with an argument containing spaces. For example --post-hook "mkdir t\ est"
will create two direcories t\
and est
instead of t est
because both are treated as separate arguments.Would it be a bad practice to just always execute
/bin/sh
and pass the whole command
as a single argument?ldez commented
Hello,
I recommend to use a script instead of a simple command line.