Compare commits

...

2 Commits

Author SHA1 Message Date
autofix-ci[bot]
5658c2e017 [autofix.ci] apply automated fixes 2025-07-22 21:26:26 +00:00
Dylan Conway
d1bf4fdda7 rename to bun-{pid}.core 2025-07-22 14:21:12 -07:00

View File

@@ -1,6 +1,6 @@
import fs from "node:fs";
import { tmpdir } from "node:os";
import { basename, join } from "node:path";
import { join } from "node:path";
import { parseArgs } from "node:util";
// usage: bun debug-coredump.ts
@@ -44,8 +44,8 @@ if (!fs.existsSync(join(dir, "bun-profile")) || !fs.existsSync(join(dir, `bun-${
await Bun.$`bash -c ${`age -d -i <(echo "$AGE_CORES_IDENTITY")`} < ${cores} | tar -zxvC ${dir}`;
console.log("moving cores out of nested directory");
for await (const file of new Bun.Glob("bun-cores-*/bun-*.core").scan(dir)) {
fs.renameSync(join(dir, file), join(dir, basename(file)));
for await (const file of new Bun.Glob("bun-cores-*/*.core").scan(dir)) {
fs.renameSync(join(dir, file), join(dir, `bun-${pid}.core`));
}
} else {
console.log(`already downloaded in ${dir}`);