@node-core/utils 4.2.0 → 4.2.1

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/lib/run.js CHANGED
@@ -36,6 +36,7 @@ function runAsyncBase(cmd, args, {
36
36
  child.stdout.setEncoding('utf8');
37
37
  child.stdout.on('data', (chunk) => { stdout += chunk; });
38
38
  }
39
+ child.on('error', reject);
39
40
  child.on('close', (code) => {
40
41
  if (code !== 0) {
41
42
  if (ignoreFailure) {
@@ -3,7 +3,7 @@ import { promises as fs } from 'node:fs';
3
3
  import { Listr } from 'listr2';
4
4
 
5
5
  import { v8Git } from './constants.js';
6
- import { runAsync } from '../run.js';
6
+ import { forceRunAsync } from '../run.js';
7
7
 
8
8
  export default function updateV8Clone() {
9
9
  return {
@@ -19,7 +19,7 @@ function fetchOrigin() {
19
19
  title: 'Fetch V8',
20
20
  task: async(ctx, task) => {
21
21
  try {
22
- await runAsync('git', ['fetch', 'origin'], {
22
+ await forceRunAsync('git', ['fetch', 'origin'], {
23
23
  spawnArgs: { cwd: ctx.v8Dir, stdio: 'ignore' }
24
24
  });
25
25
  } catch (e) {
@@ -39,8 +39,8 @@ function createClone() {
39
39
  title: 'Clone V8',
40
40
  task: async(ctx) => {
41
41
  await fs.mkdir(ctx.baseDir, { recursive: true });
42
- await runAsync('git', ['clone', v8Git], {
43
- spawnArgs: { cwd: ctx.baseDir, stdio: 'ignore' }
42
+ await forceRunAsync('git', ['clone', v8Git, ctx.v8Dir], {
43
+ spawnArgs: { stdio: 'ignore' }
44
44
  });
45
45
  },
46
46
  enabled: (ctx) => ctx.shouldClone
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-core/utils",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Utilities for Node.js core collaborators",
5
5
  "type": "module",
6
6
  "engines": {