@theholocron/cli 5.0.0-alpha.166 → 5.0.0-alpha.167
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.mjs +24 -3
- package/dist/cli.mjs.map +1 -1
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -5877,14 +5877,35 @@ async function installSkills({ agent, skills, repoRoot }) {
|
|
|
5877
5877
|
try {
|
|
5878
5878
|
skillsRoot = dirname(require.resolve("@theholocron/skills/package.json"));
|
|
5879
5879
|
} catch {
|
|
5880
|
-
|
|
5880
|
+
const atWorkspaceRoot = await isWorkspaceRoot(repoRoot);
|
|
5881
|
+
let result = spawnSync("pnpm", [
|
|
5881
5882
|
"add",
|
|
5882
5883
|
"-D",
|
|
5884
|
+
...atWorkspaceRoot ? ["-w"] : [],
|
|
5883
5885
|
"@theholocron/skills"
|
|
5884
5886
|
], {
|
|
5885
5887
|
cwd: repoRoot,
|
|
5886
|
-
stdio:
|
|
5887
|
-
|
|
5888
|
+
stdio: [
|
|
5889
|
+
"inherit",
|
|
5890
|
+
"inherit",
|
|
5891
|
+
"pipe"
|
|
5892
|
+
],
|
|
5893
|
+
encoding: "utf8"
|
|
5894
|
+
});
|
|
5895
|
+
if (result.status !== 0 && !atWorkspaceRoot && result.stderr?.includes("ERR_PNPM_ADDING_TO_ROOT")) {
|
|
5896
|
+
process.stderr.write(result.stderr);
|
|
5897
|
+
result = spawnSync("pnpm", [
|
|
5898
|
+
"add",
|
|
5899
|
+
"-D",
|
|
5900
|
+
"-w",
|
|
5901
|
+
"@theholocron/skills"
|
|
5902
|
+
], {
|
|
5903
|
+
cwd: repoRoot,
|
|
5904
|
+
stdio: "inherit",
|
|
5905
|
+
encoding: "utf8"
|
|
5906
|
+
});
|
|
5907
|
+
} else if (result.status !== 0 && result.stderr) process.stderr.write(result.stderr);
|
|
5908
|
+
if (result.status !== 0) throw new Error("failed to auto-install @theholocron/skills");
|
|
5888
5909
|
try {
|
|
5889
5910
|
skillsRoot = dirname(require.resolve("@theholocron/skills/package.json"));
|
|
5890
5911
|
} catch {
|