 {find} = helpers = require 'atom-linter'
 path = require 'path'
 globule = require 'globule'
-ChildProcess = require 'child_process'
+{spawnSync} = require 'child_process'
 {getPath} = require 'consistent-path'
-env = Object.assign({}, process.env)
-
+env = Object.assign({}, process.env, {PATH: getPath()})
 prefixPath = null
 
 module.exports =

          if error.message is 'prefix' then atom.notifications.addError """
            **Error getting $PATH - linter-sass-lint**\n

            You've enabled using global sass-lint without specifying a prefix so we tried.
            Unfortunately we were unable to execute `npm get prefix` for you\n
            Please make sure Atom is getting $PATH correctly or set it directly in linter-sass-lint settings
          """, {dismissable: true}
          return []

          atom.notifications.addWarning """
            **Sass-lint package missing**

            The sass-lint package cannot be found, please check sass-lint package path option of this package. \n
            If you leave this option empty the sass-lint package included with linter-sass-lint will be used.
          """, {dismissable: true}
          return []


    if @globalPath is '' and prefixPath is null
      npmCommand = if process.platform is 'win32' then 'npm.cmd' else 'npm'
      try
        prefixPath = spawnSync(npmCommand, [
          'get'
          'prefix'
        ], {env}).output[1].toString().trim()
