Skip to content

Commit

Permalink
Updates from rustwide changes
Browse files Browse the repository at this point in the history
  • Loading branch information
l4l committed Oct 28, 2021
1 parent 255876f commit 11a5624
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions src/docbuilder/rustwide_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use postgres::Client;
use rustwide::cmd::{Command, CommandError, SandboxBuilder, SandboxImage};
use rustwide::logging::{self, LogStorage};
use rustwide::toolchain::ToolchainError;
use rustwide::{Build, Crate, Toolchain, Workspace, WorkspaceBuilder};
use rustwide::{AlternativeRegistry, Build, Crate, Toolchain, Workspace, WorkspaceBuilder};
use serde_json::Value;
use std::collections::{HashMap, HashSet};
use std::path::Path;
Expand Down Expand Up @@ -297,7 +297,13 @@ impl RustwideBuilder {
let krate = match kind {
PackageKind::Local(path) => Crate::local(path),
PackageKind::CratesIo => Crate::crates_io(name, version),
PackageKind::Registry { url, key } => Crate::registry(url, name, version, key),
PackageKind::Registry { url, key } => {
let mut registry = AlternativeRegistry::new(url);
if let Some(key) = key {
registry.authenticate_with_ssh_key(key);
}
Crate::registry(registry, name, version)
}
};
krate.fetch(&self.workspace)?;

Expand Down

0 comments on commit 11a5624

Please sign in to comment.