Fix for #2251 Oni does not correctly locate executables (#2440)

This commit is contained in:
Paul Roberts 2018-07-20 17:00:18 -07:00 committed by Bryan Phelps
parent f47506103b
commit 4bdb4f83ed
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import * as path from "path"
import { CLIArgs, parseCLIProcessArgv } from "./cli_args"
import { spawn } from "child_process"
@ -27,7 +26,10 @@ export async function main(cli_arguments: string[]): Promise<any> {
// Otherwise, was loaded normally, so launch Oni.
const env = assign({}, process.env, {
const shellEnvPromise = import("shell-env")
const shellEnv = (await shellEnvPromise).sync()
const env = assign({}, process.env, shellEnv, {
ONI_CLI: "1", // Let Oni know it was started from the CLI
ELECTRON_NO_ATTACH_CONSOLE: "1",
})