Skip to content

Commit

Permalink
fix(cred): Get wincred building on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 18, 2023
1 parent b533f89 commit 943edea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/credential/cargo-credential-wincred/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Cargo registry windows credential process.

#[cfg(windows)]
mod win {
use cargo_credential::{Credential, Error};
use std::ffi::OsStr;
Expand Down Expand Up @@ -111,6 +112,11 @@ mod win {
}
}

#[cfg(not(windows))]
use cargo_credential::UnsupportedCredential as WindowsCredential;
#[cfg(windows)]
use win::WindowsCredential;

fn main() {
cargo_credential::main(win::WindowsCredential);
cargo_credential::main(WindowsCredential);
}

0 comments on commit 943edea

Please sign in to comment.