Skip to content

Commit

Permalink
fix(cred): Get macos 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 6d405e6 commit 0262320
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Cargo registry macos keychain credential process.

#[cfg(target_os = "macos")]
mod macos {
use cargo_credential::{Credential, Error};
use security_framework::os::macos::keychain::SecKeychain;
Expand Down Expand Up @@ -47,6 +48,11 @@ mod macos {
}
}

#[cfg(not(target_os = "macos"))]
use cargo_credential::UnsupportedCredential as MacKeychain;
#[cfg(target_os = "macos")]
use macos::MacKeychain;

fn main() {
cargo_credential::main(macos::MacKeychain);
cargo_credential::main(MacKeychain);
}

0 comments on commit 0262320

Please sign in to comment.