diff --git a/src/commands/helpers.ts b/src/commands/helpers.ts index e114f46..af8262c 100644 --- a/src/commands/helpers.ts +++ b/src/commands/helpers.ts @@ -96,6 +96,10 @@ const SKIP_RESOLVE = new Set([ "Podfile.lock", "poetry.lock", "pubspec.lock", + "flake.lock", + "gradle.lockfile", + "npm-shrinkwrap.json", + "Package.resolved", "uv.lock", "yarn.lock", ]) @@ -124,7 +128,8 @@ export async function resolveConflicts( ) if (resolved.exitCode !== 0) { - throw new Error(`Claude failed to resolve ${file}: ${resolved.stderr.toString().trim()}`) + const stderr = resolved.stderr.toString().trim() + throw new Error(`Claude failed to resolve ${file}: ${stderr || "(no output)"}`) } await Bun.write(join(cwd, file), resolved.stdout.trimEnd() + "\n") diff --git a/src/git.ts b/src/git.ts index 3f55b02..de40efc 100644 --- a/src/git.ts +++ b/src/git.ts @@ -137,7 +137,8 @@ export async function commit(message: string, cwd: string): Promise { export async function checkoutTheirs(file: string, cwd: string): Promise { const result = await $`git checkout --theirs -- ${file}`.cwd(cwd).nothrow().quiet() if (result.exitCode !== 0) { - throw new Error(`Failed to checkout theirs for ${file}: ${result.stderr.toString().trim()}`) + const stderr = result.stderr.toString().trim() + throw new Error(`Failed to checkout theirs for ${file}: ${stderr || "(no output)"}`) } } @@ -145,7 +146,8 @@ export async function checkoutTheirs(file: string, cwd: string): Promise { export async function stageFile(file: string, cwd: string): Promise { const result = await $`git add ${file}`.cwd(cwd).nothrow().quiet() if (result.exitCode !== 0) { - throw new Error(`Failed to stage ${file}: ${result.stderr.toString().trim()}`) + const stderr = result.stderr.toString().trim() + throw new Error(`Failed to stage ${file}: ${stderr || "(no output)"}`) } }