mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Fix broken command parameter
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
child_process = require('child_process')
|
||||
{getShellEnv} = require("../src/environment")
|
||||
|
||||
describe "Environment handling", ->
|
||||
fdescribe "Environment handling", ->
|
||||
describe "when things are configured properly", ->
|
||||
beforeEach ->
|
||||
spyOn(child_process, "spawnSync").andReturn
|
||||
@@ -21,7 +21,7 @@ describe "Environment handling", ->
|
||||
describe "when an error occurs", ->
|
||||
beforeEach ->
|
||||
spyOn(child_process, "spawnSync").andReturn
|
||||
error: new Error
|
||||
error: new Error("testing when an error occurs")
|
||||
|
||||
it "returns undefined", ->
|
||||
expect(getShellEnv()).toBeUndefined()
|
||||
|
||||
@@ -231,7 +231,8 @@ class AtomEnvironment extends Model
|
||||
checkPortableHomeWritable()
|
||||
|
||||
# Patch the `process.env` on startup to fix the problem first documented
|
||||
# in #4126
|
||||
# in #4126. Retain the original in case someone needs it.
|
||||
process._originalEnv = process.env
|
||||
process.env = @project.getEnv()
|
||||
|
||||
attachSaveStateListeners: ->
|
||||
|
||||
@@ -12,7 +12,7 @@ getRawShellEnv = ->
|
||||
# work with csh or tcsh. Given that bash and zsh should cover the
|
||||
# vast majority of users and it gracefully falls back to prior behavior,
|
||||
# this should be safe.
|
||||
results = child_process.spawnSync shell, ["-ilc"], input: "env", encoding: "utf8"
|
||||
results = child_process.spawnSync(shell, ["-ilc", "env"], encoding: "utf8")
|
||||
return if results.error?
|
||||
return unless results.stdout and results.stdout.length > 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user