forked from mirrors/jj
cli: fix SSH key discovery on Windows
$HOME isn't set here, but `dirs` has suitable magic for us already.
This commit is contained in:
parent
0aa5f1ae10
commit
7e7735e6b5
1 changed files with 1 additions and 1 deletions
|
@ -660,7 +660,7 @@ fn decode_assuan_data(encoded: &str) -> Option<String> {
|
|||
#[tracing::instrument]
|
||||
fn get_ssh_keys(_username: &str) -> Vec<PathBuf> {
|
||||
let mut paths = vec![];
|
||||
if let Ok(home_dir) = std::env::var("HOME") {
|
||||
if let Some(home_dir) = dirs::home_dir() {
|
||||
let ssh_dir = Path::new(&home_dir).join(".ssh");
|
||||
for filename in ["id_ed25519_sk", "id_ed25519", "id_rsa"] {
|
||||
let key_path = ssh_dir.join(filename);
|
||||
|
|
Loading…
Reference in a new issue