File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,13 +214,13 @@ export async function setupInlineFixture(options: {
214214 // write additional files
215215 if ( options . files ) {
216216 for ( let [ filename , contents ] of Object . entries ( options . files ) ) {
217- const filepath = path . join ( options . dest , filename )
218- fs . mkdirSync ( path . dirname ( filepath ) , { recursive : true } )
217+ const destFile = path . join ( options . dest , filename )
218+ fs . mkdirSync ( path . dirname ( destFile ) , { recursive : true } )
219219
220220 // custom command
221221 if ( typeof contents === 'object' && 'cp' in contents ) {
222222 const srcFile = path . join ( options . dest , contents . cp )
223- fs . cpSync ( srcFile , filepath , { recursive : true } )
223+ fs . copyFileSync ( srcFile , destFile )
224224 continue
225225 }
226226
@@ -231,7 +231,7 @@ export async function setupInlineFixture(options: {
231231 . split ( '\n' )
232232 . map ( ( line ) => line . replace ( new RegExp ( `^${ indent } ` ) , '' ) )
233233 . join ( '\n' )
234- fs . writeFileSync ( filepath , strippedContents )
234+ fs . writeFileSync ( destFile , strippedContents )
235235 }
236236 }
237237}
You can’t perform that action at this time.
0 commit comments