Add error handling for symlink creation to prevent worker crashes

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-11-14 16:09:50 +00:00
parent 610fe36af1
commit 9e7701aa1d

View File

@ -42,8 +42,14 @@ async function linkCommand() {
await fs.unlink(tmpTarget); await fs.unlink(tmpTarget);
} }
} catch (error) { } } catch (error) { }
await fs.symlink(source, tmpTarget);
await fs.rename(tmpTarget, target); try {
await fs.symlink(source, tmpTarget);
await fs.rename(tmpTarget, target);
} catch (error) {
// Silently ignore symlink errors (e.g., when running as non-root user)
// The application will automatically use full paths via shell/share.sh:define_cmd()
}
} }
} }