代码之家  ›  专栏  ›  技术社区  ›  Leon Gaban

无法安装gactions CLI

  •  2
  • Leon Gaban  · 技术社区  · 9 年前

    我正在尝试安装google actions CLI。

    文件: https://developers.google.com/actions/tools/gactions-cli

    我遵循了 commands here question/answer here .

    然后对其运行以下命令: Run chmod +x gactions to make the binary executable.

    它确实将文件转换为可执行文件。当我点击它时,它在终端中打开并做了一些事情。

    enter image description here

    enter image description here

    此外,我不使用终端,而是使用iterm2,因此我尝试在iterm2中打开可执行文件,但出现了这个错误。

    enter image description here

    如何更新$PATH

    我把间隙文件放在这里了

    enter image description here

    export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export GOOGLE_SDK_PATH="/Users/leongaban/Projects/YumBrands/GoogleHome"
    export TERM="xterm-256color"
    export NODE_ENV
    
    3 回复  |  直到 9 年前
        1
  •  5
  •   Prisoner    9 年前

    这个 gactions

    你可以通过 echo $PATH

    如果您希望继续从下载目录中运行它(我这样做,因为我很少使用该命令),可以打开iterm2命令行并使用完整路径调用gactions:

    ~/Downloads/gactions
    

    或者(使用您的示例)

    ~/Projects/YumBrands/GoogleHome/gactions
    

    PATH="$PATH:$HOME/Projects/YumBrands/GoogleHome"
    

    然后,您可以打开一个新的终端或iterm2窗口,并确认它在您的路径中

    echo $PATH
    

    使用它的正常方式是创建一个目录,在其中开发动作(我使用~/Documents/Projects),并让gaction创建默认值 action.json

    mkdir ~/Documents/Projects/new-sample-action
    cd  ~/Documents/Projects/new-sample-action
    ~/Downloads/gactions init
    

    (如果您已经更新了路径,您可以使用 gactions init 最后一行。)

        2
  •  1
  •   Hasan A Yousef Michael Benjamin    8 年前

    下载 gactions

    然后转到项目目录cd“ 项目目录

    运行以下命令:

    $ chmod +x gactions
    
    $ ./gactions init
    

    它将创建 放入您的文件夹

        3
  •  0
  •   Siddharth Sunchu    7 年前

    转到下载gactions文件的相应路径。

    chmod +x gactions
    ./gactions help