go-shellwords icon indicating copy to clipboard operation
go-shellwords copied to clipboard

Unexpected output

Open galamit1 opened this issue 2 years ago • 1 comments

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 :)

galamit1 avatar Jun 08 '23 15:06 galamit1