Skip to content

Commit

Permalink
fix(rebuild): Log stdout and stderr (#1450)
Browse files Browse the repository at this point in the history
This logs the output of the rebuild process to help debug build failures like #1415
  • Loading branch information
lgeiger authored and develar committed Apr 10, 2017
1 parent 5b83860 commit ada9cac
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions packages/electron-builder/src/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ function installDependencies(appDir: string, frameworkInfo: DesktopFrameworkInfo
return spawn(execPath, execArgs, {
cwd: appDir,
env: getGypEnv(frameworkInfo, platform, arch, buildFromSource),
stdio: ["pipe", process.stdout, process.stderr]
})
}

Expand Down Expand Up @@ -114,7 +115,11 @@ export async function rebuild(appDir: string, frameworkInfo: DesktopFrameworkInf
execArgs.push(...additionalArgs)
await BluebirdPromise.each(nativeDeps, dep => {
log(`Rebuilding native dependency ${dep.name}`)
return spawn(execPath, execArgs, {cwd: dep.path, env: env})
return spawn(execPath, execArgs, {
cwd: dep.path,
env: env,
stdio: ["pipe", process.stdout, process.stderr]
})
.catch(error => {
if (dep.optional) {
warn(`Cannot build optional native dep ${dep.name}`)
Expand All @@ -129,6 +134,10 @@ export async function rebuild(appDir: string, frameworkInfo: DesktopFrameworkInf
execArgs.push("rebuild")
execArgs.push(...additionalArgs)
execArgs.push(...nativeDeps.map(it => it.name))
await spawn(execPath, execArgs, {cwd: appDir, env: env})
await spawn(execPath, execArgs, {
cwd: appDir,
env: env,
stdio: ["pipe", process.stdout, process.stderr]
})
}
}

0 comments on commit ada9cac

Please sign in to comment.