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

ignoring source overrides in local .cargo/config #80

Merged
merged 1 commit into from
Dec 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,20 @@ struct RegistryDependency {

fn main() {
env_logger::init();
let mut config = Config::default().unwrap();

// We're doing the vendoring operation outselves, so we don't actually want
// to respect any of the `source` configuration in Cargo itself. That's
// intended for other consumers of Cargo, but we want to go straight to the
// source, e.g. crates.io, to fetch crates.
let mut config = {
let config_orig = Config::default().unwrap();
let mut values = config_orig.values().unwrap().clone();
values.remove("source");
let config = Config::default().unwrap();
config.set_values(values).unwrap();
config
};

let usage = r#"
Vendor all dependencies for a project locally

Expand Down