Skip to content

Instantly share code, notes, and snippets.

@ryumu
Created April 8, 2015 04:57
Show Gist options
  • Save ryumu/8e69556072402647bffb to your computer and use it in GitHub Desktop.
Save ryumu/8e69556072402647bffb to your computer and use it in GitHub Desktop.
if process.env.PATH.indexOf('anyenv') == -1
anyenvPath = "#{process.env.HOME}/.anyenv"
if fs.existsSync(anyenvPath)
shims = fs.readdirSync("#{anyenvPath}/envs/").map (file)->
"#{anyenvPath}/envs/#{file}/shims"
.join(":")
process.env.PATH = "#{shims}:#{process.env.PATH}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment