You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So if I understand, the intention is to use escargot API to help generate the flags for cargo build but you wouldn't then want the other half, of parsing the output?
So if I understand, the intention is to use escargot API to help generate the flags for cargo build but you wouldn't then want the other half, of parsing the output?
No, I would still use the parsing of the output.
For example, with the following code:
let cargo = CargoBuild::new().manifest_path(...).arg(...);letmut 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 Command from CargoBuild.
We could even have another function that just returns the &mut Command:
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();
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: