@igorlau/dotagents 1.0.17 → 1.0.18

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.
@@ -1 +1 @@
1
- {"commit":"386b124"}
1
+ {"commit":"85a839f"}
package/dist/commands.js CHANGED
@@ -296,6 +296,19 @@ export function setCheckHook(cwd, enabled, dryRun) {
296
296
  export function selfUpdate(args) {
297
297
  const source = readSource();
298
298
  log(`Running the latest dotagents from ${source}:`);
299
- const result = spawnSync("npx", ["--yes", "--prefer-online", source, "update", ...args], { stdio: "inherit" });
299
+ const npx = npxCommand(["--yes", "--prefer-online", source, "update", ...args]);
300
+ const result = spawnSync(npx.command, npx.args, { shell: npx.shell, stdio: "inherit" });
300
301
  return result.status === 0;
301
302
  }
303
+ /**
304
+ * Builds the command that starts `npx`. On Windows, `npx` is `npx.cmd`, which Node starts only through a shell,
305
+ * so the arguments go into one quoted command line. `cmd.exe` still reads `"` and `%` inside quotes, so those throw.
306
+ */
307
+ export function npxCommand(args, platform = process.platform) {
308
+ if (platform !== "win32")
309
+ return { args, command: "npx", shell: false };
310
+ const unsafe = args.find((arg) => /["%]/.test(arg));
311
+ if (unsafe !== undefined)
312
+ throw new Error(`Cannot pass ${unsafe} to npx on Windows. Remove the " and % characters.`);
313
+ return { args: [], command: ["npx", ...args.map((arg) => `"${arg}"`)].join(" "), shell: true };
314
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igorlau/dotagents",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "Install a curated set of agent skills and rules into Claude Code, Codex, and GitHub Copilot.",
5
5
  "license": "MIT",
6
6
  "repository": {