intellij-idea 如何在Windows中运行Intellij中的.sh脚本

imzjd6km  于 2022-11-01  发布在  Windows
关注(0)|答案(1)|浏览(817)

我有一个关于在Windows中运行Intellij sh文件的问题。
当我单击文件中的run按钮时,我得到了如下所示的输出。

PS C:\Users\username\IdeaProjects\library> /bin/sh C:/Users/username/IdeaProjects/library/aws-setup.sh
/bin/sh : The term '/bin/sh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify t
hat the path is correct and try again.
At line:1 char:1
+ /bin/sh C:/Users/username/IdeaProjects/library/aws-setup.sh
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (/bin/sh:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

我该如何修复它?

e7arh2l6

e7arh2l61#

设置(macOS上的首选项)|工具Name|终点站|c:\Program Files\Git\bin\bash.exe的Shell路径或使用Shell脚本运行配置,并将解释器路径设置为bash.exe

相关问题