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 authored and heisen-li committed Apr 21, 2023
1 parent 7e8847c commit be7b553
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 be7b553

Please sign in to comment.