Skip to content

Commit

Permalink
refactor package command to ensure dist directory is created if it do…
Browse files Browse the repository at this point in the history
…esn't exist
  • Loading branch information
mauro-balades committed Jan 28, 2025
1 parent cbd450a commit 9275c14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 9275c14

Please sign in to comment.