Skip to content

Commit 0f25454

Browse files
committed
Improve error handling
1 parent 187dcbe commit 0f25454

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ export const resolveConflicts = async <T extends string = InbuiltMergeStrategies
5252
if (conflicts.length === 0) {
5353
const serialized = await serialize(format, merged);
5454
await fs.writeFile(filePath, serialized, "utf8");
55-
execSync(`git add ${filePath}`);
55+
try {
56+
execSync(`git add ${filePath}`);
57+
} catch (error) {
58+
globalLogger.warn(filePath, `Failed to stage file: ${error}`);
59+
}
5660
} else {
5761
const serialized = await reconstructConflict(merged, ours, theirs, format);
5862
await Promise.all([

0 commit comments

Comments
 (0)