在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
我怎么才能修好它?
发布于 2022-10-17 18:54:35
设置设置(macOS上的首选项),用c:\Program Files\Git\bin\bash.exe
或使用Shell脚本运行配置,解释器路径设置为bash.exe
https://stackoverflow.com/questions/74101727
复制相似问题