@zicolasjac-ai/remote-readonly-ssh 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/init.js +5 -5
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -97,14 +97,14 @@ async function runInteractive({ input = process.stdin, output = process.stdout,
|
|
|
97
97
|
? rlFactory()
|
|
98
98
|
: readline.createInterface({ input, output });
|
|
99
99
|
try {
|
|
100
|
-
let overwrite = "
|
|
100
|
+
let overwrite = "1";
|
|
101
101
|
if (existed) {
|
|
102
|
-
const ans = (await rl.question(`检测到已存在配置 ${dest}\n (
|
|
103
|
-
overwrite = ans || "
|
|
102
|
+
const ans = (await rl.question(`检测到已存在配置 ${dest}\n (1) 跳过配置,仅安装 skill (2) 备份后重写 (3) 直接覆盖 [1]: `)).trim();
|
|
103
|
+
overwrite = ans || "1";
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
if (!existed || overwrite === "
|
|
107
|
-
if (existed && overwrite === "
|
|
106
|
+
if (!existed || overwrite === "3" || overwrite === "2") {
|
|
107
|
+
if (existed && overwrite === "2") {
|
|
108
108
|
fs.copyFileSync(dest, dest + ".bak");
|
|
109
109
|
}
|
|
110
110
|
fs.mkdirSync(destDir, { recursive: true });
|