LoginSignup
4
4

More than 5 years have passed since last update.

set: Warning: $PATH entry "/usr/usename/.rbenv/bin" is not valid (No such file or directory)って出たとき

Last updated at Posted at 2018-10-15

fishでconfigファイルに記述するべきものを、setコマンドでうっちゃって、ずっと消えないやつです:fish:

TL;DR

ターミナルでずっと下記のような警告文が出ます:fish::anger:

set: Warning: $PATH entry "/Users/hoge/.rbenv/bin" is not valid (No such file or directory)
set: Warning: $PATH entry "/usr/local/bin/rbenv" is not valid (Not a directory)
set: Warning: $PATH entry "/Users/hoge/.nodebrew/current/bineval" is not valid (No such file or directory)

対象読者

  • fish消しても、ターミナルを再起動しても、config.fishの中にある環境変数を消しても、.bashrcなどを消しても直らなかった人です:fish:

  • homebrewでfishをインストールしています:fish:

処方箋

githubのissueでも議論されていますが
https://github.com/yarnpkg/yarn/issues/5555

$HOME/.config/fish/fishd.××××××××××××
# This file is automatically generated by the fish.
# Do NOT edit it directly, your changes will be overwritten.
SET hogehogehoge
SET hogehogehoge
SET hogehogehoge
SET hogehogehoge
SET hogehogehoge
SET hogehogehoge
SET hogehogehoge

自分は2行目以降のSETをすべて削除しました(どっちみち自動生成されますが)
すると、ターミナルから警告文が削除されました:santa:

githubでは

$HOME/.config/fish/fishd.××××××××××××
SET fish_user_paths:/Users/tony/Library/Python/3\x2e6/bin\x1e/Users/tony/\x2eyarn/bin

が要因だと言っていますが、自分は全部削除しました(どっちみち自動生成されるようなので)
https://github.com/yarnpkg/yarn/issues/5555#issuecomment-375944732

参考

4
4
1

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