Skip to content

Commit 8fc7566

Browse files
committed
chore: tweak
1 parent 8ae8ae3 commit 8fc7566

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

packages/plugin-rsc/e2e/fixture.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)