mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
fix: clean runtime deps backup owner marker
This commit is contained in:
@@ -106,6 +106,7 @@ function replaceDirAtomically(targetPath, sourcePath) {
|
||||
} catch (error) {
|
||||
if (movedExistingTarget && !fs.existsSync(targetPath) && fs.existsSync(backupPath)) {
|
||||
fs.renameSync(backupPath, targetPath);
|
||||
removePathIfExists(path.join(targetPath, TEMP_OWNER_FILE));
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -392,6 +392,7 @@ describe("stageBundledPluginRuntimeDeps", () => {
|
||||
).toThrow("rename failed after backup");
|
||||
|
||||
expect(fs.readFileSync(path.join(targetPath, "marker.txt"), "utf8")).toBe("original\n");
|
||||
expect(fs.existsSync(path.join(targetPath, "owner.json"))).toBe(false);
|
||||
});
|
||||
|
||||
it("restages when installed root runtime dependency contents change", () => {
|
||||
|
||||
Reference in New Issue
Block a user