-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to get the Command
from CargoBuild
#77
Comments
So if I understand, the intention is to use |
No, I would still use the parsing of the output. For example, with the following code: let cargo = CargoBuild::new().manifest_path(...).arg(...);
let mut command = cargo.into_command();
// Function that modifies `Command` to add args or env variables.
other_crate::Struct::function(&mut command);
let r = CommandMessages::with_command(command); The only missing piece is something that returns the inner let cargo = CargoBuild::new().manifest_path(...).arg(...);
// Function that modifies `Command` to add args or env variables.
other_crate::Struct::function(cargo.command_mut());
let r = cargo.exec(); |
Thanks for the further explanation. Feel free to put up a PR for |
The API of
CargoBuild
does not allow us to get the innerCommand
it is building.We can only run the
Command
withexec()
.Having access to a method like
into_command()
(or something similar) can be useful if another crate requires a&mut Command
to do something.The text was updated successfully, but these errors were encountered: