Skip to content

Commit

Permalink
fix: do not remove outputDir directory when overwriting is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Mar 14, 2024
1 parent 14689de commit 6d73eaa
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/downloader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { existsSync, readFileSync, mkdirSync, writeFileSync, rmSync } from 'node:fs'
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs'
import { extname, posix, resolve, dirname } from 'node:path'
import { ofetch } from 'ofetch'
import { Hookable } from 'hookable'
Expand Down Expand Up @@ -77,10 +77,6 @@ export class Downloader extends Hookable<DownloaderHooks> {
overwriting = true
}

if (overwriting) {
rmSync(outputDir, { recursive: true, force: true })
}

await this.callHook('download:start')

// download css content
Expand Down

0 comments on commit 6d73eaa

Please sign in to comment.