fix: preserve argument boundaries when passing commands via --
This commit is contained in:
@@ -136,7 +136,7 @@ func runCommand(cmd *cobra.Command, args []string) error {
|
|||||||
case cmdString != "":
|
case cmdString != "":
|
||||||
command = cmdString
|
command = cmdString
|
||||||
case len(args) > 0:
|
case len(args) > 0:
|
||||||
command = strings.Join(args, " ")
|
command = sandbox.ShellQuote(args)
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("no command specified. Use -c <command> or provide command arguments")
|
return fmt.Errorf("no command specified. Use -c <command> or provide command arguments")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user