[英]ZSH: Run shell script from nodejs w/child process exec > command not found (beginner)
I am trying to run a script from node w/exec and I get /bin/sh: require_brew: command not found
in the terminal.我正在尝试从节点 w/exec 运行脚本,我得到/bin/sh: require_brew: command not found
in the terminal。 The goal is to run through a list of packages in node and then install them via a shell script.目标是运行节点中的软件包列表,然后通过 shell 脚本安装它们。 The command I am trying to run looks like this util/sh/requirers.sh && require_brew fzf
.我试图运行的命令看起来像这个util/sh/requirers.sh && require_brew fzf
。
When I run only the command in the terminal it returns zsh: command not found
.当我仅在终端中运行命令时,它会返回zsh: command not found
。 I am not sure what do in order to make it run.我不确定要做什么才能使其运行。
The solution was to add a single period .
解决方案是添加一个 period .
before the script like so: . util/sh/requirers.sh && require_brew
在脚本之前是这样的: . util/sh/requirers.sh && require_brew
. util/sh/requirers.sh && require_brew
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.