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.
This commit is contained in:
parent
1ab8524cfb
commit
87f10ceda0
1 changed files with 1 additions and 0 deletions
|
|
@ -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 [<dest>] [--from public] [--only a,b | --from-config] [--prune] [--protect a,b] [--dry-run] (<dest> 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 <dest> outside the
|
||||
|
|
|
|||
Loading…
Reference in a new issue