New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit an error if `quitAndInstall` is called without an update being available #5287

Merged
merged 1 commit into from Apr 26, 2016

Conversation

Projects
None yet
2 participants
@MarshallOfSound
Member

MarshallOfSound commented Apr 25, 2016

Emit an error if quitAndInstall is called without an update being available.

Fixes #3840

@@ -22,6 +22,8 @@
} // namespace
bool update_available = false;

This comment has been minimized.

@zcbenz

zcbenz Apr 26, 2016

Contributor

The global variables should be moved into anonymous namespace and the name should starts with g_. The g_updater variable is a good example here.

This comment has been minimized.

@MarshallOfSound
@@ -12,6 +12,9 @@ function AutoUpdater () {
util.inherits(AutoUpdater, EventEmitter)
AutoUpdater.prototype.quitAndInstall = function () {
if (!this.updateAvailable) {
return this.emitError('No update available, can\'t quit and install');

This comment has been minimized.

@zcbenz

zcbenz Apr 26, 2016

Contributor

It doesn't pass npm run lint, we don't use ; in JS code.

This comment has been minimized.

@MarshallOfSound

MarshallOfSound Apr 26, 2016

Member

@zcbenz Interesting, not sure why atom's linting plugins didn't pick this up.

@zcbenz zcbenz merged commit 315cd9d into electron:master Apr 26, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@zcbenz

This comment has been minimized.

Contributor

zcbenz commented Apr 26, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment