shannah / shellmarks

GUI for shell scripts
37 stars 8 forks source link

Failed to run ... java.io.IOException: Cannot run program "/bin/bash": error=2, No such file or directory #1

Open jacattrongnlh opened 2 years ago

jacattrongnlh commented 2 years ago

OS: Mac OS Monterey 12.4

I've followed instruction to install shellmarks on README.md. When I run the following example script:

!/bin/bash

echo "Hello ${name}" exit 0

[name] type="text" label="Please enter your name" required=true

using this command shellmarks /Users/apple/.shellmarks/scripts/myscript.sh, I got this error:

Failed to run /Users/apple/.shellmarks/scripts/myscript.sh
java.io.IOException: Cannot run program "/bin/bash": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at ca.weblite.shellmarks.Main.runScript(Main.java:1290)
    at ca.weblite.shellmarks.Main.run(Main.java:1258)
    at ca.weblite.shellmarks.Main.run(Main.java:1170)
    at ca.weblite.shellmarks.Main.run(Main.java:412)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at ca.weblite.shellmarks.Main.main(Main.java:1136)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
    at java.base/java.lang.ProcessImpl.start(Unknown Source)
    ... 15 more

How do I fix it?

mvhb commented 6 months ago

same behavior here.

macOS Sonoma 14.4.1 (23E224)

(node:35169) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Failed to run monkey.sh
java.io.IOException: Cannot run program "/bin/bash": error=2, No such file or directory
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at java.base/java.lang.ProcessBuilder.start(Unknown Source)
    at ca.weblite.shellmarks.Main.runScript(Main.java:1290)
    at ca.weblite.shellmarks.Main.run(Main.java:1258)
    at ca.weblite.shellmarks.Main.run(Main.java:1170)
    at ca.weblite.shellmarks.Main.run(Main.java:412)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at ca.weblite.shellmarks.Main.main(Main.java:1136)
Caused by: java.io.IOException: error=2, No such file or directory
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
    at java.base/java.lang.ProcessImpl.start(Unknown Source)
    ... 15 more