-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
This is something I've found myself wanting as I consider migrating a project from using std::process::Command to using duct::Expression. Unfortunately there's no easy way to convert between the two types, so the command! macro can't be used.
I've made an initial implementation & tests using proc_macro; all the functionality of the command! macro is intact, with the following changes:
{x}takes aduct::Expression(x)takesInto<OsString>, as required byExpression, rather thanAsRef<OsString>; as a result, the argument is moved instead of referenced[x]takesIntoIterator<Item=impl Info<OsStr>>rather thanIntoIterator<Item=impl AsRef<OsStr>>
A slight rough edge is the error message if the user doesn't have the duct crate in dependencies (or it's been renamed) - this gives the error message "could not find duct in {{root}}". I'm not sure if it's possible to replace that message.
I'd be happy to update documentation and put up a PR if this would be wanted.
Metadata
Metadata
Assignees
Labels
No labels