LoginSignup
4
0

More than 5 years have passed since last update.

Actions SDK を利用するための gactions が実行できない

Posted at

実行できず諦めかけてしまったので、共有しておきます。。。

Actions on Googleで、Actions SDK を利用するには gactions コマンドを打てるようにしなければならない(参照:Create a project and action package(公式))のですが、適当にやるとMac(x86_64)環境で"command not found"と出て、実行できなかったので正確な実行方法について書いておきます。

現象(適当なやり方)

gactions Cli で「Mac x86_64」からダウンロードした gactions ファイルを自作したプロジェクトフォルダに移動し、ターミナル上で該当フォルダに移動(cd)した後、下記のコマンドを実行。

gactions init

→ command not found.

解決(正確な方法)

自作したプロジェクトフォルダに gactions ファイルを移動した後、ターミナルで該当フォルダまで移動して、"chmod +x" 実行後、フルパスで gactions を実行。

コマンドを下記。

chmod +x gactions

~Desktop/firebase/ActionsSDKApp/gactions init

もしくは "chmod +x" 後の gactions に path を通しておくとフルパス指定がいらなくなります。

gactions ファイルのあるフォルダまで移動しておけば、ファイル名だけでコマンドが打てるのではと思っていたのですが違うようです。
コマンド系には path を通すことを心がけようと思いました。(小並感

参考

4
0
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
0