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

Config gets stuck to default if config.cson has a syntax error #3715

Closed

Description

@jbt

I somehow managed to get a syntax error in my config.cson (completely unable to reproduce what caused it now), which caused Atom to fail to parse it, and instead just used defaults.

Thinking I'd managed to delete some config somewhere went and set stuff back to how it was, but nothing was persisted and everything was reset on next restart. I'm guessing this is Atom refusing to overwrite the existing file, though I couldn't see any errors to that effect in the dev tools.

The behaviour of not completely clobbering an invalid config is good but maybe there could be a warning in the UI and/or the invalid config.cson be copied somewhere else so that subsequent changes can be persisted properly.

Activity

  1. benogle commented on Oct 3, 2014

    @benogle
    Contributor

    What version do you have? This changed a bit between 134 and 135. If 134,
    upgrade to 135. 135 shouldn't reset to defaults when reading a bogus file.

    On Friday, October 3, 2014, James Taylor [email protected] wrote:

    I somehow managed to get a syntax error in my config.cson (completely
    unable to reproduce what caused it now), which caused Atom to fail to parse
    it, and instead just used defaults.

    Thinking I'd managed to delete some config somewhere went and set stuff
    back to how it was, but nothing was persisted and everything was reset on
    next restart. I'm guessing this is Atom refusing to overwrite the existing
    file, though I couldn't see any errors to that effect in the dev tools.

    The behaviour of not completely clobbering an invalid config is good but
    maybe there could be a warning in the UI and/or the invalid config.cson be
    copied somewhere else so that subsequent changes can be persisted properly.

    —
    Reply to this email directly or view it on GitHub
    #3715.

  2. jbt commented on Oct 3, 2014

    @jbt
    Author

    I'm running off a fairly recent build from master (so more recent than 135, but it also happens if I backtrack to 135), but I don't think I explained my issue terribly well. What I mean is that if I have a dud config file it'll (obviously) fail to load on launch (and thus shows the welcome screen and all the default themes etc):

    screenshot - 031014 - 15 49 26

    The problem is that thanks to this safety check no subsequent changes to config will get persisted until I go and manually sort out the file myself. And if I don't know what I'm doing I may just not know about config.cson, or I might just decide it's easier to re-set my config manually in Settings, so I'm now left with a stuck Atom that forgets its config every time I close and reopen it.

  3. self-assigned this
    on Oct 3, 2014
  4. benogle commented on Oct 3, 2014

    @benogle
    Contributor

    Make sense now. Some kind of alert box with steps to fix would likely be sufficient.

  5. winstliu commented on Apr 13, 2015

    @winstliu
    Contributor

    Notifications should have solved this.

  6. lock commented on Jan 22, 2019

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  7. locked as resolved and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions