LoginSignup
4
3

More than 5 years have passed since last update.

AtomでanyenvのPATH

Posted at

AtomのPackageってRubyとか呼ぶの結構多いよね。

Dockとかから起動したときとかPATHが設定されてなくて困るよね。

init.coffeeにこんなの書いておくといいね。

init.coffee
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}"
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3