-
Notifications
You must be signed in to change notification settings - Fork 161
feat(rev-parse): add revision parsing command #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
087b963
b88b3ac
23bb897
37a9644
fd81680
51ba7bb
c91e0c4
55dc812
cd70d00
1e9da78
ec014ad
13527e2
1bc0f34
27d6392
54e729a
06f0d7d
4f33b38
b74b699
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -278,8 +278,20 @@ fn load_vault_unseal_key_sync() -> Result<Option<Vec<u8>>, String> { | |
| } | ||
| } | ||
|
|
||
| fn resolve_home_directory() -> Result<PathBuf, String> { | ||
| for key in ["HOME", "USERPROFILE"] { | ||
| if let Some(value) = std::env::var_os(key) | ||
| && !value.is_empty() | ||
| { | ||
| return Ok(PathBuf::from(value)); | ||
| } | ||
| } | ||
|
|
||
| dirs::home_dir().ok_or_else(|| "cannot determine home directory".to_string()) | ||
| } | ||
|
|
||
| fn ensure_vault_ssh_tmp_dir() -> Result<PathBuf, String> { | ||
| let home = dirs::home_dir().ok_or_else(|| "cannot determine home directory".to_string())?; | ||
| let home = resolve_home_directory()?; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This change writes vault SSH temp files under Useful? React with 👍 / 👎. |
||
| let tmp_dir = home.join(".libra").join("tmp"); | ||
| std::fs::create_dir_all(&tmp_dir).map_err(|e| { | ||
| format!( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.