mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Delete existing archives
This commit is contained in:
parent
383a4b2730
commit
4b73486688
1 changed files with 7 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ import {
|
||||||
expect
|
expect
|
||||||
} from 'vitest'
|
} from 'vitest'
|
||||||
|
|
||||||
|
import fs from 'fs-extra'
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
// https://github.com/mrmlnc/fast-glob
|
// https://github.com/mrmlnc/fast-glob
|
||||||
import glob from 'fast-glob'
|
import glob from 'fast-glob'
|
||||||
|
|
@ -41,6 +42,12 @@ const plainAppBundles = glob
|
||||||
async function makeZipFromBundlePath ( bundlePath ) {
|
async function makeZipFromBundlePath ( bundlePath ) {
|
||||||
const archivePath = `${ tempPath }/${ bundlePath.split('/').pop() }.zip`
|
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 )
|
// console.log( 'archivePath', archivePath )
|
||||||
|
|
||||||
const zipLib = new Zip()
|
const zipLib = new Zip()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue