@dinoxx/dinox-cli 1.0.10 → 1.0.11

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.
@@ -11,17 +11,16 @@ function detectPackageManager() {
11
11
  return 'yarn';
12
12
  return 'npm';
13
13
  }
14
- const WIN = process.platform === 'win32';
15
14
  const PM_COMMANDS = {
16
- npm: { bin: WIN ? 'npm.cmd' : 'npm', args: ['update', '-g', PACKAGE_NAME] },
17
- pnpm: { bin: WIN ? 'pnpm.cmd' : 'pnpm', args: ['update', '--global', PACKAGE_NAME] },
18
- yarn: { bin: WIN ? 'yarn.cmd' : 'yarn', args: ['global', 'upgrade', PACKAGE_NAME] },
15
+ npm: { bin: 'npm', args: ['update', '-g', PACKAGE_NAME] },
16
+ pnpm: { bin: 'pnpm', args: ['update', '--global', PACKAGE_NAME] },
17
+ yarn: { bin: 'yarn', args: ['global', 'upgrade', PACKAGE_NAME] },
19
18
  bun: { bin: 'bun', args: ['add', '--global', PACKAGE_NAME] },
20
19
  };
21
20
  function runUpdate(pm) {
22
21
  const { bin, args } = PM_COMMANDS[pm];
23
22
  return new Promise((resolve, reject) => {
24
- const child = spawn(bin, args, { stdio: 'inherit' });
23
+ const child = spawn(bin, args, { stdio: 'inherit', shell: true });
25
24
  child.on('close', (code) => {
26
25
  if (code === 0) {
27
26
  resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinoxx/dinox-cli",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Dinox CLI",
5
5
  "main": "dist/dinox.js",
6
6
  "scripts": {