From 87f10ceda09bae37b336019eed85d4463ff3ca69 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 21:00:07 +0000 Subject: [PATCH] sync-dropin --if-present: no configured destination is a skip too, not a failed build Found re-reading 2a4c3ddb3. With dropin.dest removed from the config (a site that doesn't use DX Life) and no DOXA_DROPIN_DEST, the full build's last step printed the usage line and exited 1, after a build that had passed. The host is optional, so --if-present now skips there as well. Without --if-present a missing destination is still refused. Tested: no dest configured with --if-present skips (exit 0); the plain command still exits 1; a configured but absent host still skips (exit 0). The config was restored byte for byte after the test. --- internal/sync-dropin.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/sync-dropin.mjs b/internal/sync-dropin.mjs index a8d5030c1..fb3e384fa 100644 --- a/internal/sync-dropin.mjs +++ b/internal/sync-dropin.mjs @@ -86,6 +86,7 @@ const excludedInternal = (f) => EXCLUDE.has(f) || isDoc(f) || isStaging(f) const excluded = (f) => excludedInternal(f) || isNotShipped(f) const usage = 'usage: node internal/sync-dropin.mjs [] [--from public] [--only a,b | --from-config] [--prune] [--protect a,b] [--dry-run] ( defaults to $DOXA_DROPIN_DEST, then dropin.dest in vite.doxa-maps-build-config.json)' +if (!DEST && args.includes('--if-present')) { console.log('[sync-dropin] skipped: no drop-in destination configured (dropin.dest)'); process.exit(0) } if (!DEST) { console.error(`[sync-dropin] ${usage}`); process.exit(1) } const dest = resolve(DEST) // ★ --prune INTO A SITE'S WEB-ROOT WOULD DELETE THE SITE. --prune removes every file in outside the