Skip to content

Commit

Permalink
fix: wraps installing extensions in a try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
Neintonine committed Dec 23, 2024
1 parent ddf6108 commit 1f8229b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,20 @@ const main = async () => {

console.log ("main: Install extensions ...")

const installExtension = require ("electron-devtools-installer")

const installedExtensions = await installExtension.default ([
installExtension.REACT_DEVELOPER_TOOLS,
installExtension.REDUX_DEVTOOLS,
])
try {
const installExtension = require ("electron-devtools-installer")

const installedExtensions = await installExtension.default ([
installExtension.REACT_DEVELOPER_TOOLS,
installExtension.REDUX_DEVTOOLS,
])

console.log (`main: Installed extensions: ${installedExtensions}`)
console.log (`main: Installed extensions: ${installedExtensions}`)
}
catch (error) {
console.error ("main: Installing extensions failed! Skipping extensions...")
}

console.log ("main: Create Window ...")

Expand Down

0 comments on commit 1f8229b

Please sign in to comment.