mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 09:27:24 +00:00
don't even think about updating if not enabled (fixes #2088)
This commit is contained in:
parent
e99b83dfdc
commit
26ee36458d
1 changed files with 6 additions and 4 deletions
|
@ -23,7 +23,7 @@ export class UpdaterService {
|
||||||
constructor (
|
constructor (
|
||||||
log: LogService,
|
log: LogService,
|
||||||
private electron: ElectronService,
|
private electron: ElectronService,
|
||||||
config: ConfigService,
|
private config: ConfigService,
|
||||||
) {
|
) {
|
||||||
this.logger = log.create('updater')
|
this.logger = log.create('updater')
|
||||||
|
|
||||||
|
@ -48,9 +48,8 @@ export class UpdaterService {
|
||||||
this.autoUpdater.once('update-downloaded', () => resolve(true))
|
this.autoUpdater.once('update-downloaded', () => resolve(true))
|
||||||
})
|
})
|
||||||
|
|
||||||
this.logger.debug('Checking for updates')
|
if (config.store.enableAutomaticUpdates && this.electronUpdaterAvailable && !process.env.TERMINUS_DEV) {
|
||||||
|
this.logger.debug('Checking for updates')
|
||||||
if (this.electronUpdaterAvailable && !process.env.TERMINUS_DEV) {
|
|
||||||
try {
|
try {
|
||||||
this.autoUpdater.checkForUpdates()
|
this.autoUpdater.checkForUpdates()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -61,6 +60,9 @@ export class UpdaterService {
|
||||||
}
|
}
|
||||||
|
|
||||||
async check (): Promise<boolean> {
|
async check (): Promise<boolean> {
|
||||||
|
if (!this.config.store.enableAutomaticUpdates) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
if (!this.electronUpdaterAvailable) {
|
if (!this.electronUpdaterAvailable) {
|
||||||
this.logger.debug('Checking for updates through fallback method.')
|
this.logger.debug('Checking for updates through fallback method.')
|
||||||
const response = await axios.get(UPDATES_URL)
|
const response = await axios.get(UPDATES_URL)
|
||||||
|
|
Loading…
Reference in a new issue