@cannbot-ai/install-helper 0.0.2-beta.76 → 0.0.2-beta.77
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/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/install.ps1 +22 -28
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -3161,7 +3161,7 @@ async function installPlugin(opts) {
|
|
|
3161
3161
|
}
|
|
3162
3162
|
|
|
3163
3163
|
// src/core/skill-installer.ts
|
|
3164
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmSync as rmSync2, realpathSync as realpathSync2 } from "fs";
|
|
3164
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmSync as rmSync2, realpathSync as realpathSync2, readlinkSync } from "fs";
|
|
3165
3165
|
import { join as join13, dirname as dirname6, isAbsolute } from "path";
|
|
3166
3166
|
import { select as select3, checkbox, Separator as Separator2 } from "@inquirer/prompts";
|
|
3167
3167
|
import chalk5 from "chalk";
|
|
@@ -3191,13 +3191,18 @@ async function installSkills(skillIds, tool, level, repoPath) {
|
|
|
3191
3191
|
const resolvedSource = realpathSync2(sourcePath);
|
|
3192
3192
|
if (isSymlink(targetPath)) {
|
|
3193
3193
|
try {
|
|
3194
|
-
const currentTarget =
|
|
3195
|
-
|
|
3194
|
+
const currentTarget = readlinkSync(targetPath);
|
|
3195
|
+
const normCurrent = currentTarget.replace(/\\/g, "/").toLowerCase();
|
|
3196
|
+
const normSource = resolvedSource.replace(/\\/g, "/").toLowerCase();
|
|
3197
|
+
if (normCurrent === normSource) {
|
|
3196
3198
|
results.push({ skillId, success: true });
|
|
3197
3199
|
installedIds.push(skillId);
|
|
3198
3200
|
continue;
|
|
3199
3201
|
}
|
|
3200
3202
|
} catch {
|
|
3203
|
+
results.push({ skillId, success: true });
|
|
3204
|
+
installedIds.push(skillId);
|
|
3205
|
+
continue;
|
|
3201
3206
|
}
|
|
3202
3207
|
}
|
|
3203
3208
|
if (existsSync14(targetPath) || isSymlink(targetPath)) {
|