Skip to content

Commit f76ca64

Browse files
rubiinCopilot
andauthored
fix: Update Scripts/install.sh
Co-authored-by: Copilot <[email protected]>
1 parent f3288f9 commit f76ca64

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

Scripts/install.sh

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,13 @@ migrationDir="$(realpath "$(dirname "$(realpath "$0")")/../migrations")"
289289

290290
echo "Running migrations from: ${migrationDir}"
291291

292-
migrationFile=$(ls "${migrationDir}" | sort -r | head -n 1)
293-
294-
echo "Found migration file: ${migrationFile}"
295-
296-
sh "${migrationDir}/${migrationFile}"
297-
298-
292+
if [ -d "${migrationDir}" ] && find "${migrationDir}" -type f | grep -q .; then
293+
migrationFile=$(ls "${migrationDir}" | sort -r | head -n 1)
294+
echo "Found migration file: ${migrationFile}"
295+
sh "${migrationDir}/${migrationFile}"
296+
else
297+
echo "No migration files found in ${migrationDir}. Skipping migrations."
299298
fi
300-
301299
#------------------------#
302300
# enable system services #
303301
#------------------------#

0 commit comments

Comments
 (0)