diff --git a/src/cmd/deploy.rs b/src/cmd/deploy.rs index 26014aa..8e632f2 100644 --- a/src/cmd/deploy.rs +++ b/src/cmd/deploy.rs @@ -17,7 +17,10 @@ impl Profile { let storage = PathBuf::from(&self.settings.storage_dir_store); fs::read_dir(storage)?.for_each(|entry| { let entry = entry.expect("enter store, must success"); - let path = entry.path(); + let path = entry + .path() + .canonicalize() + .expect("file path initialize error"); let name = entry.file_name().to_string_lossy().to_string(); debug!("record secret name from store: {}", name); let content = fs::read(path).expect("reading store, must success"); diff --git a/src/cmd/renc_sec_path.rs b/src/cmd/renc_sec_path.rs index 18b5315..b69721b 100644 --- a/src/cmd/renc_sec_path.rs +++ b/src/cmd/renc_sec_path.rs @@ -1,5 +1,6 @@ use std::path::PathBuf; +use eyre::Context; use sha2::{Digest, Sha256}; use spdlog::{debug, info}; diff --git a/test/secrets/renced/tester/1b91d07a2a9f7305f210128dd6f98f7a-factorio-admin.age b/test/secrets/renced/tester/1b91d07a2a9f7305f210128dd6f98f7a-factorio-admin.age index afe5bab..defb3ed 100644 Binary files a/test/secrets/renced/tester/1b91d07a2a9f7305f210128dd6f98f7a-factorio-admin.age and b/test/secrets/renced/tester/1b91d07a2a9f7305f210128dd6f98f7a-factorio-admin.age differ diff --git a/test/secrets/renced/tester/745a75ccb0974360dd2d93e3de475a84-factorio-server.age b/test/secrets/renced/tester/745a75ccb0974360dd2d93e3de475a84-factorio-server.age index 3bfeeb2..05cdead 100644 --- a/test/secrets/renced/tester/745a75ccb0974360dd2d93e3de475a84-factorio-server.age +++ b/test/secrets/renced/tester/745a75ccb0974360dd2d93e3de475a84-factorio-server.age @@ -1,9 +1,8 @@ age-encryption.org/v1 --> ssh-ed25519 IQ9o3A /fK+a1YKItRkkd4WKil476eX5A5CYhf7zwez/2owFQk -WiyBeL3Tovn7z0jy77CW9e53NyKg1niJ8WiZqBG1Rr8 --> --grease -N1X8Psrs1N+6BEJ3LsfarXQqApEepD0IS5N8c3mjY0hx0Jd6wPrgCw95o5UKW9vn -MobkL9cfpAOt2jtQlzCYfFtJdlQKk4idSlwMkO2BZL30IAx+VtICpfg/JNqGu9Vv -BO4 ---- iYgSYgc6/WPLO5dOON56wvGX45L8H/DIqiUON1EMUXk -$ ?r1.KزIU'äE49TY \ No newline at end of file +-> ssh-ed25519 IQ9o3A PktT1MeKzc+5cZeJklbzyYqD9vXNJAfCbM194aVe8SE +EaCQNLZ1s5rI26d2RIfFPpwIO5mzl52sdygtCwBsBYE +-> "NR@-grease YajL jL;@DDO +8PP76vd5OraNzxuwB7YI/KNRKnLemkgZuIHwZT07el9FU96nXRIppPDmNh/u6D/W +4qNcvEDvNjq50g3LKyaN8USOtudlr9VFbFooEkXnsXw +--- MJshF7tp5AkiBJxx5cR+ldiAo0DCBZ3DMQCKjAGgXyc +8i;l,M.emRh7E|RtDX Wp \ No newline at end of file