Ensure dest directory exists, cleanup and format

This commit is contained in:
oxmc
2025-12-07 02:55:00 -08:00
parent 4072dc6f0a
commit b2a26fbf16
14 changed files with 42 additions and 69 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { ZipFS, getLibzipSync } from "@yarnpkg/libzip";
import { patchFs, npath, PosixFS, NodeFS } from "@yarnpkg/fslib";
import { patchFs, PosixFS, NodeFS } from "@yarnpkg/fslib";
import { SnapshotZipFS } from "./SnapshotZipFS";
import * as assert from "assert";
import * as constants from "constants";
@@ -16,7 +16,7 @@ export interface NexeHeader {
}
let originalFsMethods: any = null;
let lazyRestoreFs = () => {};
let lazyRestoreFs = () => { };
const patches = (process as any).nexe.patches || {};
const originalPatches = { ...patches };
delete (process as any).nexe;
@@ -125,7 +125,7 @@ function shimFs(binary: NexeHeader, fs: typeof import("fs") = require("fs")) {
lazyRestoreFs = () => {
Object.assign(fs, originalFsMethods);
Object.assign(patches, originalPatches);
lazyRestoreFs = () => {};
lazyRestoreFs = () => { };
};
}