Skip to content

Commit

Permalink
fix(respecDocWriter): use default userDataDir (#4495)
Browse files Browse the repository at this point in the history
  • Loading branch information
deniak authored Jul 26, 2023
1 parent 1328c40 commit ae68c4e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tools/respecDocWriter.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/**
* Exports toHTML() method, allowing programmatic control of the spec generator.
*/
import { mkdtemp, readFile } from "fs/promises";
import { fileURLToPath } from "url";
import path from "path";
import puppeteer from "puppeteer";
import { tmpdir } from "os";
import { readFile } from "fs/promises";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

Expand Down Expand Up @@ -58,13 +57,11 @@ export async function toHTML(src, options = {}) {
options.onWarning(warning);
};

const userDataDir = await mkdtemp(`${tmpdir()}/respec2html-`);
const args = [];
if (disableSandbox) args.push("--no-sandbox");

log("Launching browser");
const browser = await puppeteer.launch({
userDataDir,
args,
devtools,
headless: "new",
Expand Down

0 comments on commit ae68c4e

Please sign in to comment.