Skip to content

Commit 743df5b

Browse files
author
Matthias Rütten
committed
fixing the auto update
1 parent cee52ee commit 743df5b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/autoUpdates.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import { ipcMain } from 'electron'
1+
import { ipcMain, app } from 'electron'
22
import { autoUpdater } from 'electron-updater'
33
import * as log from 'electron-log'
44
import * as path from 'path'
55

66
export const setupAutoUpdater = () => {
77
autoUpdater.autoDownload = false
88

9-
if (process.env.NODE_ENV !== 'production') {
9+
if (!app.isPackaged) {
1010
// __dirname is the "dist" folder
11-
autoUpdater.updateConfigPath = path.join(__dirname, '../dev-app-update.yml')
11+
const updateConfigPath = path.join(__dirname, '../dev-app-update.yml')
12+
13+
log.info(`Updating the auto updater config path to "${updateConfigPath}".`)
14+
autoUpdater.updateConfigPath = updateConfigPath
1215
}
1316

1417
ipcMain.on('download-and-install-update', () => {

webpack.renderer.config.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ module.exports = merge.smart(baseConfig, {
5959
tsconfig: 'tsconfig-renderer.json'
6060
}),
6161
new webpack.NamedModulesPlugin(),
62-
new HtmlWebpackPlugin(),
63-
new webpack.DefinePlugin({
64-
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
65-
})
62+
new HtmlWebpackPlugin()
6663
]
6764
});

0 commit comments

Comments
 (0)