File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/plugin-lighthouse/src/lib/runner Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import type { Config, RunnerResult } from 'lighthouse';
22import { runLighthouse } from 'lighthouse/cli/run.js' ;
33import path from 'node:path' ;
44import type { AuditOutputs , RunnerFunction } from '@code-pushup/models' ;
5- import { ensureDirectoryExists , ui } from '@code-pushup/utils' ;
5+ import { ensureDirectoryExists , pluginWorkDir , ui } from '@code-pushup/utils' ;
6+ import { LIGHTHOUSE_PLUGIN_SLUG } from '../constants.js' ;
67import { orderSlug , shouldExpandForUrls } from '../processing.js' ;
78import type { LighthouseOptions } from '../types.js' ;
89import { DEFAULT_CLI_FLAGS } from './constants.js' ;
@@ -19,6 +20,11 @@ export function createRunnerFunction(
1920 flags : LighthouseCliFlags = DEFAULT_CLI_FLAGS ,
2021) : RunnerFunction {
2122 return async ( ) : Promise < AuditOutputs > => {
23+ process . env [ 'TEMP' ] = path . join (
24+ pluginWorkDir ( LIGHTHOUSE_PLUGIN_SLUG ) ,
25+ 'tmp' ,
26+ ) ;
27+
2228 const config = await getConfig ( flags ) ;
2329 const normalizationFlags = enrichFlags ( flags ) ;
2430 const isSingleUrl = ! shouldExpandForUrls ( urls . length ) ;
You can’t perform that action at this time.
0 commit comments