airail 0.1.9 → 0.1.10
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/dist/cli/add.js +11 -2
- package/package.json +1 -1
package/dist/cli/add.js
CHANGED
|
@@ -106,8 +106,17 @@ async function cmdAdd(arg) {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
if (config.pack) {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
const [selectedName] = packNameWithVersion.split('@');
|
|
110
|
+
if (config.pack === selectedName) {
|
|
111
|
+
const yes = await (0, prompts_1.confirm)({ message: `已安装 ${config.pack},是否重新安装以更新?`, default: true });
|
|
112
|
+
if (!yes)
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
const yes = await (0, prompts_1.confirm)({ message: `当前已安装 ${config.pack},替换为 ${selectedName}?`, default: true });
|
|
117
|
+
if (!yes)
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
111
120
|
}
|
|
112
121
|
await installPackFromConfigCenter(packNameWithVersion, claudeDir, config, packs);
|
|
113
122
|
(0, utils_1.writeAirailJson)(claudeDir, config);
|