@majordigital/create-acorn 1.5.8 → 1.5.9

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.
@@ -70,7 +70,17 @@ function parseFlag(name) {
70
70
 
71
71
  function runCommand(cmd, args, options = {}) {
72
72
  return new Promise((resolve, reject) => {
73
- const child = spawn(cmd, args, { stdio: 'inherit', ...options });
73
+ const isWindows = process.platform === 'win32';
74
+ // On Windows, npm/npx are .cmd shims that require a shell to resolve.
75
+ // Quote args containing spaces/special chars so shell parsing preserves them.
76
+ const quotedArgs = isWindows
77
+ ? args.map((a) => (/[\s"'&|<>^()]/.test(a) ? `"${a.replace(/"/g, '\\"')}"` : a))
78
+ : args;
79
+ const child = spawn(cmd, quotedArgs, {
80
+ stdio: 'inherit',
81
+ shell: isWindows,
82
+ ...options,
83
+ });
74
84
  child.on('close', (code) => {
75
85
  if (code === 0) resolve();
76
86
  else reject(new Error(`${cmd} ${args.join(' ')} exited with code ${code}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@majordigital/create-acorn",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "Interactive starter CLI for Acorn with Storyblok/Prismic/DatoCMS, TypeScript, and Tailwind.",
5
5
  "bin": {
6
6
  "create-acorn": "bin/create-acorn.mjs",