build: fix keyring to 4.0.0; fix all API incompatibilities
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: If4fc94695137265ac73506bdd2a62ae96a6a6964
This commit is contained in:
parent
98892ac48b
commit
422da994d2
4 changed files with 2763 additions and 103 deletions
2708
Cargo.lock
generated
2708
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -21,13 +21,14 @@ futures = "0.3.32"
|
|||
git2 = "0.20.4"
|
||||
glob = "0.3.3"
|
||||
indicatif = "0.18.4"
|
||||
keyring = "3.6.3"
|
||||
libc = "0.2.185"
|
||||
keyring = "4.0.0"
|
||||
keyring-core = "1.0.0"
|
||||
libc = "0.2.186"
|
||||
log = "0.4.29"
|
||||
md-5 = "0.11.0"
|
||||
rand = "0.10.1"
|
||||
regex = "1.12.3"
|
||||
reqwest = { version = "0.13.2", features = [ "json" ] }
|
||||
reqwest = { version = "0.13.3", features = [ "json" ] }
|
||||
semver = "1.0.28"
|
||||
serde = { version = "1.0.228", features = [ "derive" ] }
|
||||
serde_json = "1.0.149"
|
||||
|
|
@ -40,7 +41,7 @@ thiserror = "2.0.18"
|
|||
tokio = { version = "1.52.1", features = [ "full" ] }
|
||||
walkdir = "2.5.0"
|
||||
yansi = "1.0.1"
|
||||
zip = "8.5.1"
|
||||
zip = "8.6.0"
|
||||
|
||||
[dev-dependencies]
|
||||
mockito = "1.7.2"
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ async fn main() -> Result<(), PakkerError> {
|
|||
.format_module_path(false)
|
||||
.init();
|
||||
|
||||
// Initialize the platform keyring store so credential commands work.
|
||||
if let Err(e) = keyring::use_native_store(false) {
|
||||
log::warn!("Failed to initialize platform keyring store: {e}");
|
||||
}
|
||||
|
||||
// Search for pakker-lock.json in current directory and parent directories
|
||||
let working_dir =
|
||||
find_working_directory().unwrap_or_else(|| PathBuf::from("."));
|
||||
|
|
|
|||
|
|
@ -310,13 +310,13 @@ fn resolve_secret_with_fallback(
|
|||
|
||||
fn get_keyring_secret(
|
||||
entry: &str,
|
||||
) -> std::result::Result<String, keyring::Error> {
|
||||
let e = keyring::Entry::new("pakker", entry)?;
|
||||
) -> std::result::Result<String, keyring_core::Error> {
|
||||
let e = keyring_core::Entry::new("pakker", entry)?;
|
||||
e.get_password()
|
||||
}
|
||||
|
||||
pub fn set_keyring_secret(entry: &str, value: &str) -> Result<()> {
|
||||
let e = keyring::Entry::new("pakker", entry).map_err(|e| {
|
||||
let e = keyring_core::Entry::new("pakker", entry).map_err(|e| {
|
||||
PakkerError::InternalError(format!(
|
||||
"Failed to access keyring entry {entry}: {e}"
|
||||
))
|
||||
|
|
@ -330,14 +330,14 @@ pub fn set_keyring_secret(entry: &str, value: &str) -> Result<()> {
|
|||
}
|
||||
|
||||
fn delete_keyring_secret(entry: &str) -> Result<()> {
|
||||
let e = keyring::Entry::new("pakker", entry).map_err(|e| {
|
||||
let e = keyring_core::Entry::new("pakker", entry).map_err(|e| {
|
||||
PakkerError::InternalError(format!(
|
||||
"Failed to access keyring entry {entry}: {e}"
|
||||
))
|
||||
})?;
|
||||
|
||||
match e.delete_credential() {
|
||||
Ok(()) | Err(keyring::Error::NoEntry) => Ok(()),
|
||||
Ok(()) | Err(keyring_core::Error::NoEntry) => Ok(()),
|
||||
Err(e) => {
|
||||
Err(PakkerError::InternalError(format!(
|
||||
"Failed to delete keyring entry {entry}: {e}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue