Skip to content

Commit 91f4e65

Browse files
authored
Merge pull request #5 from incident-io/fix/start-script-path
Make scripts work when called from remote location
2 parents 2f1033b + 3e3a242 commit 91f4e65

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

start-with-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/bin/bash
22
set -e
33

4+
# Get the directory where this script is located
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
47
# Load environment variables from .env file if it exists
58
if [ -f ".env" ]; then
69
export $(grep -v '^#' .env | xargs)
@@ -20,4 +23,4 @@ if [ ! -f "./bin/mcp-server" ]; then
2023
fi
2124

2225
# Run the server
23-
exec ./bin/mcp-server
26+
exec "$SCRIPT_DIR/bin/mcp-server"

0 commit comments

Comments
 (0)