mirror of
https://github.com/whyour/qinglong.git
synced 2026-02-12 14:05:38 +08:00
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:
parent
610fe36af1
commit
9e7701aa1d
|
|
@ -42,8 +42,14 @@ async function linkCommand() {
|
|||
await fs.unlink(tmpTarget);
|
||||
}
|
||||
} 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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user