Skip to content
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

Monkey Patch for support target_dir. #340

Conversation

xiaoniu-578fa6bff964d005

This is just an adhoc solution for issue #272
Possble improvement: read .cargo/config to get target-dir.

This is just an adhoc solution for issue cross-rs#272
Possble improvement: read `.cargo/config` to get target-dir.
@@ -8,12 +8,14 @@ pub struct Args {
pub all: Vec<String>,
pub subcommand: Option<Subcommand>,
pub target: Option<Target>,
pub target_dir: Option<String>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a PathBuf.

} else if !arg.starts_with('-') && sc.is_none() {
sc = Some(Subcommand::from(&**arg));
}
}
}

// delete target-dir from args.all
if let Some(ind) = all.iter().position(|x| x=="--target-dir") {
all[ind]=String::new();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call all.remove(ind) to remove the item.

@bors bors bot closed this in 2f284ac Jan 9, 2020
@bors bors bot closed this in #363 Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants