[macOS Catalina] fish-shell でRustupコマンドをインストールする方法


[macOS Catalina] fish-shell で rustup コマンドをインストールする方法

以下のコマンドを実行する

curl https://sh.rustup.rs -sSf | sh

この場合、以下のようなエラーが出る場合がある。

error: could not amend shell profile: '/Users/{ユーザー名}/.profile'
error: caused by: could not write rcfile file: '/Users/{ユーザー名}/.profile'
error: caused by: Permission denied (os error 13)

fish-shell からインストールすると設定ファイルの上書きに失敗することがあるらしい・・・

権限系のエラーなので、 sudo をつければよいかと考えられるが、それでも上手く行かない。

そこで、 --no-modify-path オプションを付けると解決できる。

curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path