Skip to content

Commit 46cb0b9

Browse files
committed
try getting homedir in es6 way
1 parent f06fb5d commit 46cb0b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { join } from 'path';
2+
import { homedir } from 'os';
23

34
import chalk from 'chalk';
45
import * as dotenv from 'dotenv';
@@ -10,7 +11,8 @@ import getSettings from './lib/get-settings/index.js';
1011
import runAudit from './lib/run-audit/index.js';
1112

1213
dotenv.config();
13-
const puppeteerCacheDir = join(__dirname, '.cache', 'puppeteer');
14+
15+
const puppeteerCacheDir = join(homedir(), '.cache', 'puppeteer');
1416

1517
export const onPreBuild = async ({ utils } = {}) => {
1618
// Puppeteer relies on a global cache since v19.x, which otherwise would not be persisted in Netlify builds

0 commit comments

Comments
 (0)