🐛 Fix move files error
This commit is contained in:
parent
87ebd71d89
commit
f12a4bc9c1
@ -105,6 +105,10 @@ export async function downloadAssets(task: InstallTask): Promise<string | undefi
|
||||
function moveFiles(from: string, to: string) {
|
||||
const files = fs.readdirSync(from)
|
||||
|
||||
if (!fs.existsSync(to)) {
|
||||
fs.mkdirSync(to, { recursive: true })
|
||||
}
|
||||
|
||||
for (const file of files) {
|
||||
const sourcePath = path.join(from, file)
|
||||
const targetPath = path.join(to, file)
|
||||
|
Loading…
x
Reference in New Issue
Block a user