fix: skip missing sync paths in commit step

This commit is contained in:
2026-05-15 03:04:27 +00:00
parent 93c602b86a
commit 684c35bc00
2 changed files with 17 additions and 1 deletions
+4 -1
View File
@@ -74,7 +74,10 @@ export async function commitAndPush(workspace, repoDir, _spawnSync = spawnSync)
fs.copyFileSync(src, dest);
}
run(['add', ...SYNC_PATHS], repoDir);
const existingSyncPaths = SYNC_PATHS.filter(relPath => fs.existsSync(path.join(repoDir, relPath)));
if (existingSyncPaths.length > 0) {
run(['add', ...existingSyncPaths], repoDir);
}
const status = run(['status', '--porcelain'], repoDir);
if (!status) {