Make sq --home=default
work.
- Home::new(None) doesn't select the default location, it honors SEQUOIA_HOME.
This commit is contained in:
parent
cea028e582
commit
75577c65c0
10
src/main.rs
10
src/main.rs
@ -223,8 +223,14 @@ fn main() -> Result<()> {
|
|||||||
policy: &policy,
|
policy: &policy,
|
||||||
time,
|
time,
|
||||||
time_is_now,
|
time_is_now,
|
||||||
home: sequoia_directories::Home::new(
|
home: if let Some(p) = c.home.as_ref().and_then(|a| a.path()) {
|
||||||
c.home.as_ref().and_then(|a| a.path()))?,
|
sequoia_directories::Home::new(p)?
|
||||||
|
} else {
|
||||||
|
sequoia_directories::Home::default()
|
||||||
|
.ok_or(anyhow::anyhow!("no default SEQUOIA_HOME \
|
||||||
|
on this platform"))?
|
||||||
|
.clone()
|
||||||
|
},
|
||||||
no_rw_cert_store: c.no_cert_store,
|
no_rw_cert_store: c.no_cert_store,
|
||||||
cert_store_path: c.cert_store.as_ref().and_then(|a| a.path()),
|
cert_store_path: c.cert_store.as_ref().and_then(|a| a.path()),
|
||||||
pep_cert_store_path: c.pep_cert_store.clone(),
|
pep_cert_store_path: c.pep_cert_store.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user