mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* More fixes for dap * More changes * More changes 2 * More fixes * Fix debugger.ts * Bun Terminal
22 lines
514 B
JavaScript
22 lines
514 B
JavaScript
import { readdirSync } from "node:fs";
|
|
import { spawn } from "node:child_process";
|
|
|
|
const { pathname } = new URL("..", import.meta.url);
|
|
process.chdir(pathname);
|
|
|
|
let path;
|
|
for (const filename of readdirSync("extension")) {
|
|
if (filename.endsWith(".vsix")) {
|
|
path = `extension/${filename}`;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (!path) {
|
|
throw new Error("No .vsix file found");
|
|
}
|
|
|
|
spawn("code", ["--new-window", `--install-extension=${path}`, `--extensionDevelopmentPath=${pathname}`, "example"], {
|
|
stdio: "inherit",
|
|
});
|