-
Notifications
You must be signed in to change notification settings - Fork 108
Description
Neither way works to run a command with arguments.
In either case clap always parses this into a vector of one element with the entire string, which will then fail to run with
error: No such file or directory (os error 2).
For example if you run rustic --password-command "echo foo" clap will set password_command in RepositoryOptions to a value like["echo foo"], rather than the presumably expected ["echo", "foo"].
I didn't test but I expect that warm_up_command has the exact same issue.
I'm happy to take a crack at solving this but I'd like some input.
In my opinion the nicest way from a user perspective would be to parse the string into arguments supporting at least quoting so you can have arguments with spaces in them.
Additional issue:
The error message is very unhelpful for a user.
There is no other information, just the error: No such file or directory (os error 2).
Had to do some chasing around in the code to figure out what it was.