Skip to content

Commit

Permalink
Only fix PATH on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
suda committed Aug 24, 2017
1 parent 8686e02 commit af2768c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ whenjs = require 'when'
fs = null
glob = null
path = null
os = null
CompositeDisposable = null

DockerManager = null
Expand Down Expand Up @@ -106,9 +107,11 @@ module.exports = ParticleDevLocalCompiler =
@core

setupDocker: ->
os ?= require 'os'
# Fix for "Unable to connect to Docker" error
childProcess = require 'child_process'
process.env.PATH = childProcess.execFileSync(process.env.SHELL, ['-i', '-c', 'echo $PATH']).toString().trim()
if os.type() == "Darwin"
childProcess = require 'child_process'
process.env.PATH = childProcess.execFileSync(process.env.SHELL, ['-i', '-c', 'echo $PATH']).toString().trim()

@dockerManager = null

Expand Down

0 comments on commit af2768c

Please sign in to comment.