feat: v1.9.8
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::env;
|
||||
use std::{env, fs};
|
||||
|
||||
use rust_util::util_env as rust_util_env;
|
||||
use rust_util::{debugging, util_env, warning};
|
||||
@@ -43,6 +43,16 @@ pub fn get_gpg_cmd() -> Option<String> {
|
||||
env::var(TINY_ENCRYPT_ENV_GPG_COMMAND).ok()
|
||||
}
|
||||
|
||||
pub fn get_default_pin_entry() -> Option<String> {
|
||||
let default_pin_entry = "/usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac";
|
||||
if let Ok(meta) = fs::metadata(default_pin_entry) {
|
||||
if meta.is_file() {
|
||||
return Some(default_pin_entry.to_string());
|
||||
}
|
||||
}
|
||||
get_pin_entry()
|
||||
}
|
||||
|
||||
pub fn get_pin_entry() -> Option<String> {
|
||||
env::var(TINY_ENCRYPT_ENV_PIN_ENTRY).ok()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user