Skip to content

Commit

Permalink
fix: force removal of staging dir
Browse files Browse the repository at this point in the history
  • Loading branch information
birme committed Nov 9, 2024
1 parent cdfdf08 commit fb0c6a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path, { join } from 'node:path';
import { spawnSync } from 'node:child_process';
import { existsSync, mkdirSync, rmdirSync, unlinkSync } from 'node:fs';
import { existsSync, mkdirSync, rmSync, unlinkSync } from 'node:fs';
import { readdir, mkdir } from 'node:fs/promises';
import { toUrl, toUrlOrUndefined } from './util';
import mv from 'mv';
Expand Down Expand Up @@ -75,7 +75,7 @@ export async function prepare(

export async function cleanup(stagingDir: string) {
console.log(`Cleaning up staging directory: ${stagingDir}`);
await rmdirSync(stagingDir);
await rmSync(stagingDir, { recursive: true, force: true });
}

export async function download(
Expand Down

0 comments on commit fb0c6a2

Please sign in to comment.