Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #19607 from atom/send-os-version
Browse files Browse the repository at this point in the history
Send OS version to the autoupdate endpoint
  • Loading branch information
rafeca committed Jun 27, 2019
2 parents c971554 + 3a4fed4 commit b6dd340
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main-process/auto-update-manager.js
@@ -1,4 +1,5 @@
const { EventEmitter } = require('events');
const os = require('os');
const path = require('path');

const IdleState = 'idle';
Expand Down Expand Up @@ -34,14 +35,16 @@ module.exports = class AutoUpdateManager extends EventEmitter {
initialize() {
if (process.platform === 'win32') {
const archSuffix = process.arch === 'ia32' ? '' : `-${process.arch}`;
this.feedUrl = `${
this.updateUrlPrefix
}/api/updates${archSuffix}?version=${this.version}`;
this.feedUrl =
this.updateUrlPrefix +
`/api/updates${archSuffix}?version=${this.version}&os_version=${
os.release
}`;
autoUpdater = require('./auto-updater-win32');
} else {
this.feedUrl = `${this.updateUrlPrefix}/api/updates?version=${
this.version
}`;
this.feedUrl =
this.updateUrlPrefix +
`/api/updates?version=${this.version}&os_version=${os.release}`;
({ autoUpdater } = require('electron'));
}

Expand Down

0 comments on commit b6dd340

Please sign in to comment.