File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/vitest/src/node/environments Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,6 @@ export function createFetchModuleFunction(
139139 }
140140 if ( promises . has ( tmp ) ) {
141141 await promises . get ( tmp )
142- Reflect . set ( transformResult , '_vitestTmp' , tmp )
143142 return getCachedResult ( result , tmp )
144143 }
145144 promises . set (
@@ -148,7 +147,10 @@ export function createFetchModuleFunction(
148147 atomicWriteFile ( tmp , code )
149148 // Fallback to non-atomic write for windows case where file already exists:
150149 . catch ( ( ) => writeFile ( tmp , code , 'utf-8' ) )
151- . finally ( ( ) => promises . delete ( tmp ) ) ,
150+ . finally ( ( ) => {
151+ Reflect . set ( transformResult , '_vitestTmp' , tmp )
152+ promises . delete ( tmp )
153+ } ) ,
152154 )
153155 await promises . get ( tmp )
154156 return getCachedResult ( result , tmp )
You can’t perform that action at this time.
0 commit comments