mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Delete existing archives
This commit is contained in:
parent
e4a3f1d795
commit
10a3d964c4
1 changed files with 7 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
expect
|
||||
} from 'vitest'
|
||||
|
||||
import fs from 'fs-extra'
|
||||
import path from 'node:path'
|
||||
// https://github.com/mrmlnc/fast-glob
|
||||
import glob from 'fast-glob'
|
||||
|
|
@ -41,6 +42,12 @@ const plainAppBundles = glob
|
|||
async function makeZipFromBundlePath ( bundlePath ) {
|
||||
const archivePath = `${ tempPath }/${ bundlePath.split('/').pop() }.zip`
|
||||
|
||||
// Delete any existing archive
|
||||
if ( await fs.exists( archivePath ) ) {
|
||||
console.log( 'Deleting existing archive', archivePath )
|
||||
await fs.unlink( archivePath )
|
||||
}
|
||||
|
||||
// console.log( 'archivePath', archivePath )
|
||||
|
||||
const zipLib = new Zip()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue