Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions packages/cli-kit/src/public/node/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -717,21 +717,5 @@ export async function copyDirectoryContents(srcDir: string, destDir: string): Pr
throw new Error(`Source directory ${srcDir} does not exist`)
}

if (!(await fileExists(destDir))) {
await mkdir(destDir)
}

// Get all files and directories in the source directory
const items = await glob(joinPath(srcDir, '**/*'))

const filesToCopy = []

for (const item of items) {
const relativePath = item.replace(srcDir, '').replace(/^[/\\]/, '')
const destPath = joinPath(destDir, relativePath)

filesToCopy.push(copyFile(item, destPath))
}

await Promise.all(filesToCopy)
await fsCopy(srcDir, destDir)
}
Loading