mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Filter cargo-credential-*
dependencies by OS
This commit is contained in:
parent
1d8980511e
commit
1ee96328c3
12
Cargo.toml
12
Cargo.toml
@ -128,9 +128,6 @@ anyhow.workspace = true
|
|||||||
base64.workspace = true
|
base64.workspace = true
|
||||||
bytesize.workspace = true
|
bytesize.workspace = true
|
||||||
cargo-credential.workspace = true
|
cargo-credential.workspace = true
|
||||||
cargo-credential-libsecret.workspace = true
|
|
||||||
cargo-credential-macos-keychain.workspace = true
|
|
||||||
cargo-credential-wincred.workspace = true
|
|
||||||
cargo-platform.workspace = true
|
cargo-platform.workspace = true
|
||||||
cargo-util.workspace = true
|
cargo-util.workspace = true
|
||||||
clap = { workspace = true, features = ["wrap_help"] }
|
clap = { workspace = true, features = ["wrap_help"] }
|
||||||
@ -189,9 +186,18 @@ unicode-xid.workspace = true
|
|||||||
url.workspace = true
|
url.workspace = true
|
||||||
walkdir.workspace = true
|
walkdir.workspace = true
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
|
cargo-credential-libsecret.workspace = true
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
|
cargo-credential-macos-keychain.workspace = true
|
||||||
|
|
||||||
[target.'cfg(not(windows))'.dependencies]
|
[target.'cfg(not(windows))'.dependencies]
|
||||||
openssl = { workspace = true, optional = true }
|
openssl = { workspace = true, optional = true }
|
||||||
|
|
||||||
|
[target.'cfg(windows)'.dependencies]
|
||||||
|
cargo-credential-wincred.workspace = true
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies.windows-sys]
|
[target.'cfg(windows)'.dependencies.windows-sys]
|
||||||
workspace = true
|
workspace = true
|
||||||
features = [
|
features = [
|
||||||
|
@ -529,9 +529,15 @@ fn credential_action(
|
|||||||
}
|
}
|
||||||
"cargo:paseto" => bail!("cargo:paseto requires -Zasymmetric-token"),
|
"cargo:paseto" => bail!("cargo:paseto requires -Zasymmetric-token"),
|
||||||
"cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
|
"cargo:token-from-stdout" => Box::new(BasicProcessCredential {}),
|
||||||
|
#[cfg(windows)]
|
||||||
"cargo:wincred" => Box::new(cargo_credential_wincred::WindowsCredential {}),
|
"cargo:wincred" => Box::new(cargo_credential_wincred::WindowsCredential {}),
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
"cargo:macos-keychain" => Box::new(cargo_credential_macos_keychain::MacKeychain {}),
|
"cargo:macos-keychain" => Box::new(cargo_credential_macos_keychain::MacKeychain {}),
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
"cargo:libsecret" => Box::new(cargo_credential_libsecret::LibSecretCredential {}),
|
"cargo:libsecret" => Box::new(cargo_credential_libsecret::LibSecretCredential {}),
|
||||||
|
name if BUILT_IN_PROVIDERS.contains(&name) => {
|
||||||
|
Box::new(cargo_credential::UnsupportedCredential {})
|
||||||
|
}
|
||||||
process => Box::new(CredentialProcessCredential::new(process)),
|
process => Box::new(CredentialProcessCredential::new(process)),
|
||||||
};
|
};
|
||||||
config.shell().verbose(|c| {
|
config.shell().verbose(|c| {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user