LoginSignup
4
4

More than 5 years have passed since last update.

Atomエディタのscriptプラグインでhomebrewでインストールしたプログラムが動かなかったとき

Posted at

Atomエディタのscriptプラグインは、Atom上でプログラムを実行してくれてとても便利。
プログラム実行のショートカットキーはcommand + iです。

でも、homebrewでインストールしたプログラムがプログラムが参照できないことがあったのです。

スクリーンショット 2015-11-20 22.21.03.png

そういうときは

Atom -> Open Your Init Script(japanese-menuプラグインで日本語化している場合は「起動スクリプトを開く」)もしくはvi ~/.atom/init.coffeeなどで設定ファイルを開き、

スクリーンショット 2015-11-20 22.38.48.png

init.coffee
# 下記の記述を追加してください
process.env.PATH = ['/usr/local/bin', process.env.PATH].join(':')

それからAtom再起動すると

command + iで目的のスクリプトが動きます。

スクリーンショット 2015-11-20 22.22.17.png

japanese-menuプラグインとscriptプラグインの作者さんありがとう。超べんりです。

おわり。

参考と注釈

4
4
2

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
4