fix(sync): create SYNC_BASE_PATH at startup before watching

The prod Dockerfile creates /var/lib/romm/sync at build time, but if a
user overrides SYNC_BASE_PATH to a path that doesn't exist (or runs the
dev entrypoint, which never created the default), watchfiles fails to
start because its target directory is missing. Have both entrypoints
mkdir -p the resolved path before handing it to watchfiles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Georges-Antoine Assi
2026-05-17 14:12:16 -04:00
parent c97ec449e2
commit e5c9d0faf7
2 changed files with 2 additions and 0 deletions

View File

@@ -249,6 +249,7 @@ start_bin_watcher() {
start_bin_sync_watcher() {
info_log "Starting sync folder watcher"
local sync_base_path="${SYNC_BASE_PATH:-/var/lib/romm/sync}"
mkdir -p "${sync_base_path}"
if [[ ${OTEL_SDK_DISABLED:-false} == "true" ]]; then
watchfiles \
--target-type command \