[BUILDTOOLS-301] Executing applyPatches fails for non-BASH shell Created: 29/Jan/17  Updated: 29/Jan/17  Resolved: 29/Jan/17

Status: Resolved
Project: BuildTools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Bram Gotink Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

My default shell is FISH, which is not compatible with BASH.
I get the following output when running

java -jar BuildTools.jar
Unsupported use of '&&'. In fish, please use 'COMMAND; and COMMAND'.
applyPatches.sh (line 44): applyPatch Bukkit Spigot-API origin/spigot && applyPatch CraftBukkit Spigot-Server origin/patched
                                                                       ^
<W> fish: Error while reading file applyPatches.sh

Error compiling Spigot. Please check the wiki for FAQs.
If this does not resolve your issue then please pastebin the entire BuildTools.log.txt file when seeking support.
java.lang.RuntimeException: Error running command, return status !=0: [/usr/local/bin/fish, applyPatches.sh]
at org.spigotmc.builder.Builder.runProcess(Builder.java:552)
at org.spigotmc.builder.Builder.main(Builder.java:434)

The script has a shebang for /bin/bash, but it is executed by /usr/local/bin/fish because of this line in Builder.java



 Comments   
Comment by md_5 [ 29/Jan/17 ]

Scripts should now run with sh

Comment by md_5 [ 29/Jan/17 ]

Set SHELL=bash before java

Generated at Tue Mar 18 22:10:59 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.