From 533ceb2c2ebca509046e449f768906dde05a071c Mon Sep 17 00:00:00 2001
From: Salt <rehashedsalt@cock.li>
Date: Thu, 26 May 2022 21:59:36 -0500
Subject: [PATCH] Add a patch to make sure we don't recursively copy root
 around

---
 start-server.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/start-server.sh b/start-server.sh
index db1244f..4b48e31 100755
--- a/start-server.sh
+++ b/start-server.sh
@@ -15,7 +15,11 @@ if [ -n "$FORGE_PACK_ZIP" ]; then
 	curl -L "$FORGE_PACK_ZIP" -o pack.zip
 	unzip pack.zip
 	directory="$(find . -type d -iname "mods" -execdir pwd \; | sort -n | head -n 1)"
-	echo "Found modpack directory: $directory"
+	if [ -z "$directory" ]; then
+		echo "Unable to find mods directory"
+	else
+		echo "Found modpack directory: $directory"
+	fi
 	rsync -av --ignore-existing "$directory"/ /minecraft/
 	popd > /dev/null 2>&1
 fi