Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion scripts/api-sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,10 @@ function runCli(array $argv, string $root): void
$mode = $opts['apply'] ? 'apply' : 'check';
// Resolved and validated once, right where they enter the program (see resolveReadablePath()/
// resolveWritablePath() above), not re-trusted as raw strings at each later read/write.
$specPath = resolveReadablePath($opts['spec'] ?? ($root.'/.api-sync/spec-current.json'), '--spec');
// Non-apply modes assert against committed state, so the snapshot is the right
// default: spec-current.json only exists on the api-sync-data branch.
$defaultSpec = $mode === 'apply' ? '/.api-sync/spec-current.json' : '/.api-sync/spec-snapshot.json';
$specPath = resolveReadablePath($opts['spec'] ?? ($root.$defaultSpec), '--spec');
$reportPath = $opts['report'] !== null ? resolveWritablePath($opts['report'], '--report') : null;

$map = loadJson($root.'/.api-sync/spec-map.json');
Expand Down
Loading