Repository navigation
Add a core config core.automaticallyUpdate to disable Atom autoupdate. - #9990
Conversation
core.enableAutoupdate to disable atom Autoupdate.core.enableAutoupdate to disable Atom autoupdate.
c5f27e5 to
ee3bc59
Compare
|
Great! |
|
If i have autoupdate disabled, its still possible to check and install manually an update? |
|
@philipgiuliani My current plan is hide the |
|
@scv119: If I were you, I wouldn't hide the button. Disabled autoupdate should still allow me to check for updates manually if I want to. This way, autoupdate wouldn't eat my limited bandwidth or slow my net down to a crawl when I want to do other stuff, but I could check for updates once I was back to the unlimited connection and/or stopped watching YT. (just an example, btw) |
I am ok with that. @scv119 What do you think? |
|
Makes sense for me. I will update the PR. |
|
Addressed the comments:
|
|
Really cool 👍 Like this, the feature makes sense to me! |
|
While looking at the fs calls in If these lines trigger an fs exception in the main process then the app will fail to load and fail to update so the person will be in a permanently bad state. I know they are unguarded currently in the render process but it would seem worth wrapping them in a |
|
Note to self (:tophat: @kevinsawicki): Update this text to remind people to update Atom before reporting issues. |
|
hmm, I might have done something wrong |
core.enableAutoupdate to disable Atom autoupdate.core.automaticallyUpdate to disable Atom autoupdate.
I think that what you did is fine, but could you add a test for that handling? It would be good to have a test that sets up one of those file system APIs to throw an exception, and assert that the config keeps working consistently. Something like this: describe ".loadUserConfig", ->
# ...
describe "when the config file fails to load", ->
beforeEach ->
spyOn(fs, 'existsSync').andCallFake -> throw new Error("EPERM")
it "does not try to save later changes to disk", ->
atom.config.loadUserConfig()
atom.config.set("foo.bar", "baz")
advanceClock(100)
expect(atom.config.save).not.toHaveBeenCalled()
expect(atom.config.get("foo.bar")).toBe "baz" |
|
@maxbrunsfeld test added. |
|
Alright @scv119, thanks for this! |
Add a core config `core.automaticallyUpdate` to disable Atom autoupdate.
This PR does following:
core.automaticallyUpdate. This config is enabled by default, but if user disable it, the new Atom window won't check update/schedule update on startup.--no-auto-updateand revert all related code introduced in Add --no-auto-update while runscripts/buildto disable autoupdate #8721What I have tested:
scrip/buildto build a new Atom.app.enableAutoupdateis selected by default, and the checkUpdate button showed up in Atom menu.enableAutoupdateoption, open a new Atom window, the checkUpdate button disappeared from Atom menu.