bash - 在 Ubuntu 上运行外部工具 - Intellij 作为 sh 文件 - 找不到命令

标签 bash ubuntu intellij-idea sh external-tools

我正在尝试执行一个非常简单的脚本,它只使用以前预装的包通过 启动一个假的 smtp 服务器。易于获取 .
这是我的脚本的代码(真的很简单)

echo 'Runs a fake stmp server'
fake-smtp-server
当我直接在终端中运行它时,它可以正常工作:
enter image description here
但是,当我尝试通过 intellij 的外部工具运行它时,它不起作用。
这是我的外部工具配置,我已经尝试使用 bin/bash 和 bin/sh 运行,但两者都出现相同的错误:
enter image description here
这是我在运行 Intellij 终端时遇到的错误:
enter image description here

最佳答案

添加到 PATH此脚本所在的目录。配置这个PATH在您用户的 bash 配置文件启动脚本中并重新登录系统。
作为一种解决方法,您还可以通过 idea.sh 从终端运行 IDE。脚本。

关于bash - 在 Ubuntu 上运行外部工具 - Intellij 作为 sh 文件 - 找不到命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69910478/

相关文章:

linux - 删除方括号外的所有数据

php - ubuntu 16 上 php7 出现 Apache2 错误

c - `clear` 导致 undefined reference 错误

Docker:在 Linux 上无法在 @INC 中找到 Tk.pm(您可能需要安装 Tk 模块)

java - Intellij 中的 this.localMethod() 检查/提取

python - 通过调用打印 $env :myVar=myvalue 的 python 脚本在 powershell 中设置环境变量

bash:评论一个长管道

bash - 在安装hadoop时,当我运行start-dfs.sh命令时,它显示 'no such file or directory found'

intellij-idea - gradle.properties 文件放在哪里

android-studio - IntelliJ 和 Android Studio 之间可以共享划痕吗?