Skip to content

Commit 47813c3

Browse files
committed
fix: Define BACKEND_DIR and correct usage in oneclick-conda-install.sh
1 parent 0a11de9 commit 47813c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

oneclick-conda-install.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ set -euo pipefail
2626
readonly PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2727
readonly FRONTEND_DIR="${PROJECT_ROOT}/surfsense_web"
2828
readonly EXTENSION_DIR="${PROJECT_ROOT}/surfsense_browser_extension"
29+
readonly BACKEND_DIR="${PROJECT_ROOT}/surfsense_backend"
2930

3031
ENV_NAME="${SURFSENSE_ENV_NAME:-surfsense}"
3132
PYTHON_VERSION="${SURFSENSE_PYTHON_VERSION:-3.12}"
@@ -74,6 +75,9 @@ main() {
7475
conda_run python -m pip install --upgrade pip setuptools wheel
7576

7677
info "Installing SurfSense backend dependencies…"
78+
if [[ ! -d "${BACKEND_DIR}" ]]; then
79+
error "Backend directory not found at '${BACKEND_DIR}'. Verify repository layout and adjust BACKEND_DIR."
80+
fi
7781
conda_run python -m pip install -e "${BACKEND_DIR}"
7882

7983
info "Installing optional developer helpers…"
@@ -96,7 +100,7 @@ main() {
96100
conda activate ${ENV_NAME}
97101
98102
2. Start the backend API:
99-
(cd ${BACKEND_DIR} && uvicorn app.app:app --reload)
103+
(cd "${BACKEND_DIR}" && uvicorn app.app:app --reload)
100104
or refer to DEPLOYMENT_GUIDE.md for production options.
101105
102106
3. Start the web app (if npm was available):
@@ -107,4 +111,3 @@ EOF
107111
}
108112

109113
main "$@"
110-

0 commit comments

Comments
 (0)