Skip to content

Commit

Permalink
support larger heap size, phetsims/chipper#1431
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kauzmann <michael.kauzmann@colorado.edu>
  • Loading branch information
zepumph committed Apr 9, 2024
1 parent 4e45876 commit 0f187fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/common/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ module.exports = function( cmd, args, cwd, options ) {
// {'reject'|'resolve'} - whether errors should be rejected or resolved. If errors are resolved, then an object
// - of the form {code:number,stdout:string,stderr:string} is returned. 'resolve' allows usage
// - in Promise.all without exiting on the 1st failure
errors: 'reject'
errors: 'reject',

// Any options that you want to provide to the child_process.spawn() command.
childProcessOptions: {}
}, options );
assert( options.errors === 'reject' || options.errors === 'resolve', 'Errors must reject or resolve' );

Expand All @@ -46,9 +49,7 @@ module.exports = function( cmd, args, cwd, options ) {
let stdout = ''; // to be appended to
let stderr = '';

const process = child_process.spawn( cmd, args, {
cwd: cwd
} );
const process = child_process.spawn( cmd, args, _.assignIn( { cwd: cwd }, options.childProcessOptions ) );

process.on( 'error', error => {
rejectedByError = true;
Expand Down

0 comments on commit 0f187fb

Please sign in to comment.