refactor package command to ensure dist directory is created if it doesn't exist
Some checks failed
CI / general (push) Has been cancelled

This commit is contained in:
mr. M 2025-01-28 17:45:47 +01:00
parent cbd450a81a
commit 9275c14c72
No known key found for this signature in database
GPG key ID: CBD57A2AEDBDA1FB
2 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@zen-browser/surfer",
"version": "1.9.15",
"version": "1.9.16",
"description": "Simplifying building firefox forks!",
"main": "index.js",
"bin": {

View file

@ -34,6 +34,9 @@ export const surferPackage = async () => {
const version = brandingDetails.release.displayVersion
const channel = brandingKey || 'unofficial'
log.debug("Creating the dist directory if it doesn't exist")
if (!existsSync(DIST_DIR)) await mkdir(DIST_DIR, { recursive: true })
// The engine directory must have been downloaded for this to be valid
// TODO: Make this a reusable function that can be used by everything
if (!process.env.JUST_MAR) {
@ -72,9 +75,6 @@ export const surferPackage = async () => {
log.info('Copying results up')
log.debug("Creating the dist directory if it doesn't exist")
if (!existsSync(DIST_DIR)) await mkdir(DIST_DIR, { recursive: true })
log.debug('Indexing files to copy')
const filesInMozillaDistrobution = await readdir(join(OBJ_DIR, 'dist'), {
withFileTypes: true,