Skip to content

Commit dc465f0

Browse files
committed
Revert "um"
This reverts commit 00f89a6.
1 parent 00f89a6 commit dc465f0

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

dist/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30995,14 +30995,14 @@ function download_file(url, filename) {
3099530995
};
3099630996

3099730997
function ensure_host_ssh_key() {
30998-
const pubkeyPath = expandHomeDir("~/.ssh/id_rsa.pub");
30999-
const privkeyPath = expandHomeDir("~/.ssh/id_rsa");
31000-
if (fs.existsSync(pubkeyPath)) {
30998+
const pubkey = expandHomeDir("~/.ssh/id_rsa.pub");
30999+
const privkey = expandHomeDir("~/.ssh/id_rsa");
31000+
if (fs.existsSync(pubkey)) {
3100131001
show_message("info", "SSH key already exists, skipping.");
3100231002
} else {
3100331003
const result = spawnSync(
3100431004
"ssh-keygen",
31005-
["-t", "rsa", "-N", "", "-f", privkeyPath],
31005+
["-t", "rsa", "-N", "", "-f", privkey],
3100631006
{
3100731007
stdio: "inherit",
3100831008
}
@@ -31016,7 +31016,6 @@ function ensure_host_ssh_key() {
3101631016
);
3101731017
}
3101831018
}
31019-
const pubkey = fs.readFileSync(pubkeyPath, "utf8");
3102031019
return pubkey;
3102131020
};
3102231021

index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ function download_file(url, filename) {
105105
};
106106

107107
function ensure_host_ssh_key() {
108-
const pubkeyPath = expandHomeDir("~/.ssh/id_rsa.pub");
109-
const privkeyPath = expandHomeDir("~/.ssh/id_rsa");
110-
if (fs.existsSync(pubkeyPath)) {
108+
const pubkey = expandHomeDir("~/.ssh/id_rsa.pub");
109+
const privkey = expandHomeDir("~/.ssh/id_rsa");
110+
if (fs.existsSync(pubkey)) {
111111
show_message("info", "SSH key already exists, skipping.");
112112
} else {
113113
const result = spawnSync(
114114
"ssh-keygen",
115-
["-t", "rsa", "-N", "", "-f", privkeyPath],
115+
["-t", "rsa", "-N", "", "-f", privkey],
116116
{
117117
stdio: "inherit",
118118
}
@@ -126,7 +126,6 @@ function ensure_host_ssh_key() {
126126
);
127127
}
128128
}
129-
const pubkey = fs.readFileSync(pubkeyPath, "utf8");
130129
return pubkey;
131130
};
132131

0 commit comments

Comments
 (0)