Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Uses batch file on Windows #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion development/build/task.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const EventEmitter = require('events')
const { spawn } = require('child_process')
const { platform } = require('os')

const tasks = {}
const taskEvents = new EventEmitter()
Expand Down Expand Up @@ -54,7 +55,8 @@ function runInChildProcess (task) {
throw new Error(`MetaMask build: runInChildProcess unable to identify task name`)
}
return instrumentForTaskStats(taskName, async () => {
const childProcess = spawn('yarn', ['build', taskName, '--skip-stats'])
const command = platform() === 'win32' ? 'yarn.cmd' : 'yarn'
const childProcess = spawn(command, ['build', taskName, '--skip-stats'])
// forward logs to main process
// skip the first stdout event (announcing the process command)
childProcess.stdout.once('data', () => {
Expand Down