mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
don't run subprocesses in lavamoat if main process not run in lavamoat (#11417)
This commit is contained in:
parent
8f371e4f87
commit
b9cf309404
@ -68,9 +68,20 @@ function runInChildProcess(task) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return instrumentForTaskStats(taskName, async () => {
|
return instrumentForTaskStats(taskName, async () => {
|
||||||
const childProcess = spawn('yarn', ['build', taskName, '--skip-stats'], {
|
let childProcess;
|
||||||
env: process.env,
|
// 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
|
// forward logs to main process
|
||||||
// skip the first stdout event (announcing the process command)
|
// skip the first stdout event (announcing the process command)
|
||||||
childProcess.stdout.once('data', () => {
|
childProcess.stdout.once('data', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user