don't run subprocesses in lavamoat if main process not run in lavamoat (#11417)

feature/default_network_editable
Etienne Dusseault 3 years ago committed by GitHub
parent 8f371e4f87
commit b9cf309404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      development/build/task.js

@ -68,9 +68,20 @@ function runInChildProcess(task) {
);
}
return instrumentForTaskStats(taskName, async () => {
const childProcess = spawn('yarn', ['build', taskName, '--skip-stats'], {
env: process.env,
});
let childProcess;
// don't run subprocesses in lavamoat for dev mode if main process not run in lavamoat
if (
taskName.includes('scripts:core:dev') &&
!process.argv[0].includes('lavamoat')
) {
childProcess = spawn('yarn', ['build:dev', taskName, '--skip-stats'], {
env: process.env,
});
} else {
childProcess = spawn('yarn', ['build', taskName, '--skip-stats'], {
env: process.env,
});
}
// forward logs to main process
// skip the first stdout event (announcing the process command)
childProcess.stdout.once('data', () => {

Loading…
Cancel
Save