はじめに
yarn のバージョンを変えようとして詰まったのでメモ。
brew install formula_raw_path
で行こうと思ったら詰まりました(_ _).。o○
追記: 普通にこれでいけるよ
$ npm install -g yarn@1.22.5
brew install formula_raw_path は使えなくなっている
$ brew install https://raw.githubusercontent.com/chenrui333/homebrew-core/461e36f85942f576d25faccfed1bf0e0000773a2/Formula/yarn.rb
Error: Calling Installation of yarn from a GitHub commit URL is disabled! Use 'brew extract yarn' to stable tap on GitHub instead.
brew extract yarn
「brew extract yarn
を使ってくれ」と言われたので、いろいろ記事を漁りながら手元でやってみる。
tap 用リポジトリの用意
$ brew tap-new arashida/taps
Initialized empty Git repository in /usr/local/Homebrew/Library/Taps/arashida/homebrew-taps/.git/
[master (root-commit) f5198d4] Create arashida/taps tap
3 files changed, 84 insertions(+)
create mode 100644 .github/workflows/publish.yml
create mode 100644 .github/workflows/tests.yml
create mode 100644 README.md
==> Created arashida/taps
/usr/local/Homebrew/Library/Taps/arashida/homebrew-taps
対象の formula を展開
$ brew extract yarn arashida/taps --version 1.22.5
==> Searching repository history
==> Writing formula for yarn from revision 9591758 to:
/usr/local/Homebrew/Library/Taps/arashida/homebrew-taps/Formula/yarn@1.22.5.rb
インストール
$ brew install arashida/taps/yarn@1.22.5
==> Installing yarn@1.22.5 from arashida/taps
==> Downloading https://yarnpkg.com/downloads/1.22.5/yarn-v1.22.5.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/49970642/2377bf00-e81c-11ea-92ab-28a657cb6dd4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F
######################################################################## 100.0%
バージョンを確認
$ yarn -v
1.22.5
終わりに
無事インストールできた…
割と詰まったので誰かのお役に立てましたら幸いですm(_ _)m