概要
Macでenvsubstコマンドを利用しようとしたら、
コマンドが無いと言われて使えなかったので調べた内容をメモする。
envsubstコマンド
Macでコマンドを実行してみるとエラーになりました。
ターミナル
$ envsubst --version
-bash: envsubst: command not found
$ gettext --version
-bash: gettext: command not found
インストールされていないかと思い、インストールを実行してみる
ターミナル
$ brew install gettext
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
No changes to formulae.
Warning: gettext 0.19.8.1 is already installed
既にインストール済みとのことですが、コマンドは見つからないというエラーは改善せず。
下記参考サイトを参考に、brew link コマンドを実行してみる。
ターミナル
$ brew link --force gettext
Linking /usr/local/Cellar/gettext/0.19.8.1... 185 symlinks created
If you need to have this software first in your PATH instead consider running:
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile
パスが通ったようで、コマンドが使えるようになった。
ターミナル
$ which gettext
/usr/local/bin/gettext
$ which envsubst
/usr/local/bin/envsubst
以上