go-shellwords
go-shellwords copied to clipboard
Unexpected output
Hello, I'm trying to parse the following command:
command := "RUN /bin/sh -c echo hi --password "pdhjcrkCHJfSchjd3f837"/ # buildkit"
args, err := shellwords.Parse(command)
and I'm getting
"RUN", "/bin/sh", "-c", "echo", "hi", "--password", "pdhjcrkCHJfSchjd3f837/", "#", "buildkit"
so one of the arguments is "pdhjcrkCHJfSchjd3f837/" and it's wrong.
Do you have an idea what can I do in order to avoid it?
Thank you :)