@open-mova/cli 0.1.11 → 0.1.12

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.
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
2
2
  import { resolve } from 'node:path';
3
3
  import { spawnSync } from 'node:child_process';
4
4
  import { readApplicationConfiguration, requireApplicationRoot, } from '../application/configuration.js';
5
- import { npmCommand } from '../utils/platform.js';
5
+ import { npmCommand, useCommandShell } from '../utils/platform.js';
6
6
  export function registerBuildCommand(program) {
7
7
  program
8
8
  .command('build')
@@ -28,6 +28,7 @@ function runBuild(directory, label) {
28
28
  const result = spawnSync(npmCommand(), ['run', 'build'], {
29
29
  cwd: directory,
30
30
  stdio: 'inherit',
31
+ shell: useCommandShell(),
31
32
  });
32
33
  if (result.status !== 0) {
33
34
  throw new Error(`La compilación de ${label} no ha finalizado correctamente.`);
@@ -2,7 +2,7 @@ import { spawnSync } from 'node:child_process';
2
2
  import { existsSync, writeFileSync } from 'node:fs';
3
3
  import { join } from 'node:path';
4
4
  import { readApplicationConfiguration, requireApplicationRoot, } from '../application/configuration.js';
5
- import { localBinaryName, npmCommand } from '../utils/platform.js';
5
+ import { localBinaryName, npmCommand, useCommandShell } from '../utils/platform.js';
6
6
  export function registerCapacitorCommands(program) {
7
7
  const capacitor = program.command('cap').description('Prepara la shell para Android o iOS');
8
8
  capacitor.command('add <platform>')
@@ -75,7 +75,11 @@ function runCapacitor(root, args) {
75
75
  run(root, binary, args);
76
76
  }
77
77
  function run(root, command, args) {
78
- const result = spawnSync(command, args, { cwd: root, stdio: 'inherit' });
78
+ const result = spawnSync(command, args, {
79
+ cwd: root,
80
+ stdio: 'inherit',
81
+ shell: useCommandShell(),
82
+ });
79
83
  if (result.error) {
80
84
  throw result.error;
81
85
  }
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
2
2
  import { spawn } from 'node:child_process';
3
3
  import { resolve } from 'node:path';
4
4
  import { readApplicationConfiguration, requireApplicationRoot, } from '../application/configuration.js';
5
- import { npmCommand } from '../utils/platform.js';
5
+ import { npmCommand, useCommandShell } from '../utils/platform.js';
6
6
  export function registerStartCommand(program) {
7
7
  program
8
8
  .command('start')
@@ -38,6 +38,7 @@ async function startProjects(projects) {
38
38
  return spawn(npmCommand(), ['run', 'start'], {
39
39
  cwd: directory,
40
40
  stdio: 'inherit',
41
+ shell: useCommandShell(),
41
42
  });
42
43
  });
43
44
  const stopChildren = () => {
@@ -1,2 +1,3 @@
1
1
  export declare function npmCommand(): string;
2
2
  export declare function localBinaryName(name: string): string;
3
+ export declare function useCommandShell(): boolean;
@@ -4,3 +4,6 @@ export function npmCommand() {
4
4
  export function localBinaryName(name) {
5
5
  return process.platform === 'win32' ? `${name}.cmd` : name;
6
6
  }
7
+ export function useCommandShell() {
8
+ return process.platform === 'win32';
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mova/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "CLI para crear y mantener aplicaciones Open Mova",
5
5
  "license": "MIT",
6
6
  "author": "Open Mova contributors",