Skip to content

Commit

Permalink
fix: uses main env variable in spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
gerard2perez committed Jun 14, 2021
1 parent 1d45fbb commit 74fe845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class LiveStream {
#arguments: [string, string[], SpawnOptions]
output: Buffer = Buffer.allocUnsafe(0)
constructor(cmd: string, cmdOptions: string[], /* istanbul ignore next */ options: SpawnOptions = {}) {
options.env = options.env || {}
options.env = options.env || process.env
options.env.FORCE_COLOR = options.env.FORCE_COLOR || 'true'
this.#arguments = [cmd, cmdOptions, {...{ stdio: SpawnStreams()}, ...options}]
const streams = (this.#arguments[2].stdio as any[]).map(stream => stream==='pipe'?undefined:stream)
Expand Down

0 comments on commit 74fe845

Please sign in to comment.