We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64d443 commit 74638dcCopy full SHA for 74638dc
bin/start.sh
@@ -1,5 +1,8 @@
1
#!/usr/bin/env bash
2
3
+SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
4
+cd "$SCRIPT_DIR" || { echo "Failed to change directory to $SCRIPT_DIR"; exit 1; }
5
+
6
if [ "$SERVER_TYPE" == "thrust" ]; then
7
echo "Starting Thrust server..."
8
./thrust ./rails server
@@ -8,5 +11,6 @@ elif [ "$SERVER_TYPE" == "background" ]; then
11
./bundle exec good_job start
9
12
else
10
13
echo "SERVER_TYPE variable: '$SERVER_TYPE' unknown. Allowed values ['thrust','background']"
- exit 1
14
+ cd - && exit 1
15
fi
16
+cd - || return 2
0 commit comments