Skip to content

Commit

Permalink
Vendor git dependencies as well in local-registry mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed May 22, 2024
1 parent 819b983 commit 2eb5ad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/buckify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ fn generate_nonvendored_sources_archive<'scope>(
},
Source::Git {
repo, commit_hash, ..
} => generate_git_fetch(repo, commit_hash).map(Some),
} => match context.config.vendor {
VendorConfig::Off => generate_git_fetch(repo, commit_hash).map(Some),
VendorConfig::LocalRegistry => {
generate_extract_archive(context, pkg, lockfile_package).map(Some)
}
VendorConfig::Source(_) => unreachable!(),
},
Source::Unrecognized(_) => {
bail!(
"`vendor = false` mode is supported only with exclusively crates.io and https git dependencies. \"{}\" {} is coming from some other source",
Expand Down
1 change: 1 addition & 0 deletions src/vendor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ pub(crate) fn cargo_vendor(
"-s",
paths.lockfile_path.to_str().unwrap(),
vendordir.to_str().unwrap(),
"--git",
];
if no_delete {
cmdline.push("--no-delete");
Expand Down

0 comments on commit 2eb5ad4

Please sign in to comment.