feat(bin): add --version and --config parameters

--config is to prevent Oxicloud loading any other .env, usefully when you want to test with different environements
This commit is contained in:
Edouard Vanbelle
2026-06-11 09:15:09 +02:00
parent 140cbb440e
commit ce69bbe151
3 changed files with 70 additions and 5 deletions
+6 -1
View File
@@ -94,7 +94,12 @@ if [[ ! -x "$OXICLOUD_BIN" ]]; then
fi
log "Starting OxiCloud server ($BUILD_TARGET) on port $SERVER_PORT..."
"$OXICLOUD_BIN" &
# `--config` pins the env file the binary reads AND suppresses the default
# `.env` probe in main.rs, so a developer's repo-root `.env` can never leak
# into a test run. Bash also sourced the same file above, so anything the
# test harness itself reads via $OXICLOUD_* stays available; dotenvy won't
# override those already-exported values.
"$OXICLOUD_BIN" --config "$COMMON/server.env" &
SERVER_PID=$!
log "Waiting for server at $base_url..."
wait_for_http "$base_url/ready" 120