Closed dweomer closed 2 years ago
I don't think %q
does what you think it does. This is doing Go escaping, not Shell escaping.
I'm also not sure why we need this. Go cmd.Command
/ Cmd.Env
should handle this for us. If its not doing the correct thing, I would consider this a Go issue.
I don't think
%q
does what you think it does. This is doing Go escaping, not Shell escaping.I'm also not sure why we need this. Go
cmd.Command
/Cmd.Env
should handle this for us. If its not doing the correct thing, I would consider this a Go issue.
Yep, appreciate the advice. This was an attempt to hack the k3s install.sh envvar capture as mentioned here in a comment on the issue that this is attempting to address, https://github.com/rancher/k3os/issues/708#issuecomment-854135597:
As mentioned in #590 we are relying on the k3s install.sh capture of k3s-related environment variables and that processing does not currently support whitespace nor shell-relevant special characters (such as !) in tokens. Until a fix lands with k3s the work-around will be to use dashes as separators instead of spaces.
Partially addresses rancher/k3os#708
Signed-off-by: Jacob Blain Christen jacob@rancher.com