Skip to content

Commit

Permalink
Properly expose FileConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Sep 16, 2024
1 parent a11c98e commit 49a5039
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions programs/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ import {
extensionStart,
type StartOptions,
extensionBuild,
type BuildOptions
// extensionPreview
type BuildOptions,
// extensionPreview,
type FileConfig
} from 'extension-develop'
import * as messages from './cli-lib/messages'
import type {BrowsersSupported} from './types'
import checkUpdates from './check-updates'
import packageJson from './package.json'

export {type FileConfig}

// Before all, check for updates.
checkUpdates(packageJson)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ export function createUserDataDir(

const preferences = firefoxMasterPreferences

const userPreferences = JSON.stringify({...preferences, ...configPreferences})
const userPreferences = {...preferences, ...configPreferences}

if (fs.existsSync(dataDir)) {
profile = getProfile(browser, dataDir, preferences || {})
profile = getProfile(browser, dataDir, userPreferences)
} else {
addProgressBar(messages.creatingUserProfile(browser), () => {})

fs.mkdirSync(dataDir, {recursive: true})
profile = createProfile(dataDir, preferences || {})
profile = createProfile(dataDir, userPreferences)
}

return profile
Expand Down

0 comments on commit 49a5039

Please sign in to comment.