chore: make credential dependencies platform-specific

This commit is contained in:
Weihang Lo 2023-04-24 14:48:06 +01:00
parent a4a8bd1742
commit 61a513c1a8
No known key found for this signature in database
GPG key ID: D7DBF189825E82E7
2 changed files with 9 additions and 1 deletions

View file

@ -8,4 +8,6 @@ description = "A Cargo credential process that stores tokens in a macOS keychain
[dependencies]
cargo-credential = { version = "0.2.0", path = "../cargo-credential" }
[target.'cfg(target_os = "macos")'.dependencies]
security-framework = "2.0.0"

View file

@ -8,4 +8,10 @@ description = "A Cargo credential process that stores tokens with Windows Creden
[dependencies]
cargo-credential = { version = "0.2.0", path = "../cargo-credential" }
windows-sys = { version = "0.48", features = ["Win32_Foundation", "Win32_Security_Credentials"] }
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48"
features = [
"Win32_Foundation",
"Win32_Security_Credentials"
]