Commit bb6b442 1 parent 4f4a630 commit bb6b442 Copy full SHA for bb6b442
File tree 1 file changed +6
-1
lines changed
packages/playwright-test/src/common
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import fs from 'fs';
19
19
import os from 'os' ;
20
20
import path from 'path' ;
21
21
import { sourceMapSupport } from '../utilsBundle' ;
22
+ import { sanitizeForFilePath } from '../util' ;
22
23
23
24
export type MemoryCache = {
24
25
codePath : string ;
@@ -27,7 +28,11 @@ export type MemoryCache = {
27
28
} ;
28
29
29
30
const version = 13 ;
30
- const cacheDir = process . env . PWTEST_CACHE_DIR || path . join ( os . tmpdir ( ) , 'playwright-transform-cache' ) ;
31
+
32
+ const DEFAULT_CACHE_DIR_WIN32 = path . join ( os . tmpdir ( ) , `playwright-transform-cache` ) ;
33
+ const DEFAULT_CACHE_DIR_POSIX = path . join ( os . tmpdir ( ) , `playwright-transform-cache-` + sanitizeForFilePath ( os . userInfo ( ) . username ) ) ;
34
+
35
+ const cacheDir = process . env . PWTEST_CACHE_DIR || ( process . platform === 'win32' ? DEFAULT_CACHE_DIR_WIN32 : DEFAULT_CACHE_DIR_POSIX ) ;
31
36
32
37
const sourceMaps : Map < string , string > = new Map ( ) ;
33
38
const memoryCache = new Map < string , MemoryCache > ( ) ;
You can’t perform that action at this time.
0 commit comments