@@ -22,9 +22,10 @@ set -euo pipefail
2222# ==============================================================================
2323
2424SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
25- BACKEND_DIR=" $SCRIPT_DIR /src/backend"
26- MCP_DIR=" $SCRIPT_DIR /src/mcp_server"
27- FRONTEND_DIR=" $SCRIPT_DIR /src/App"
25+ REPO_ROOT=" $( cd " $SCRIPT_DIR /../.." && pwd) "
26+ BACKEND_DIR=" $REPO_ROOT /src/backend"
27+ MCP_DIR=" $REPO_ROOT /src/mcp_server"
28+ FRONTEND_DIR=" $REPO_ROOT /src/App"
2829
2930# ==============================================================================
3031# Flags (set by parse_args)
@@ -316,7 +317,7 @@ fetch_configuration() {
316317 # PATH 2: Look for .azure/<env>/.env written by 'azd up'
317318 log_info " No --resource-group provided. Looking for existing config in .azure/ folder..."
318319
319- local azd_dir=" $SCRIPT_DIR /.azure"
320+ local azd_dir=" $REPO_ROOT /.azure"
320321 local azd_env_file=" "
321322 local detected_env_name=" "
322323
@@ -773,7 +774,7 @@ setup_backend() {
773774 uv sync --python 3.12 --extra dev
774775
775776 log_success " Backend setup complete"
776- cd " $SCRIPT_DIR "
777+ cd " $REPO_ROOT "
777778}
778779
779780# ==============================================================================
@@ -798,7 +799,7 @@ setup_mcp_server() {
798799 uv sync --python 3.12
799800
800801 log_success " MCP Server setup complete"
801- cd " $SCRIPT_DIR "
802+ cd " $REPO_ROOT "
802803}
803804
804805# ==============================================================================
@@ -834,7 +835,7 @@ setup_frontend() {
834835 npm run build
835836
836837 log_success " Frontend setup complete"
837- cd " $SCRIPT_DIR "
838+ cd " $REPO_ROOT "
838839}
839840
840841# ==============================================================================
@@ -846,7 +847,7 @@ setup_vscode() {
846847
847848 log_step " Step 8: Configuring VS Code"
848849
849- local vscode_dir=" $SCRIPT_DIR /.vscode"
850+ local vscode_dir=" $REPO_ROOT /.vscode"
850851 mkdir -p " $vscode_dir "
851852
852853 local extensions_file=" $vscode_dir /extensions.json"
@@ -943,7 +944,7 @@ echo ""
943944
944945parse_args " $@ "
945946
946- if [[ ! -f " $SCRIPT_DIR /src/backend/app.py" ]]; then
947+ if [[ ! -f " $REPO_ROOT /src/backend/app.py" ]]; then
947948 log_error " This script must be run from the repository root directory"
948949 exit 1
949950fi
0 commit comments