Skip to content
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

Fix config path with Atom 1.25 #403

Merged
merged 2 commits into from
Feb 21, 2018

Conversation

ykpythemind
Copy link
Contributor

@ykpythemind ykpythemind commented Feb 16, 2018

when Atom beta 1.25.0beta0, atom.config.configDirPath seems undefined.

resolve #401

@UziTech
Copy link
Member

UziTech commented Feb 19, 2018

should probably use atom.getConfigDirPath() instead of the atom.configDirPath directly to prevent this same issue in the future.

@ykpythemind
Copy link
Contributor Author

@UziTech Thank you. fixed.

@ykpythemind
Copy link
Contributor Author

This PR will also resolve #402 #404

run (cb) ->
SyncSettings.backup cb
, ->
run (cb) =>
SyncSettings.createClient().gists.get({id: @gistId}, cb)
, (err, res) ->
expect(res.files['init.coffee']).toBeDefined()
expect(res.files[path.basename(initPath)]).toBeDefined()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the changes for the init file in a separate PR since they are unrelated to the config path problem addressed in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fixed.

But in my environment, both init.coffee and init.js exists.

      it "back up the user init.coffee file", ->
        atom.config.set('sync-settings.syncInit', true)
        run (cb) ->
          SyncSettings.backup cb

this test backups init.js instead of init.coffee, so my test fails locally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch for the init files is still valid. Please create a separate PR for it though. Then they can get merged in whatever order is necessary to keep CI passing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, i will create.

@ykpythemind
Copy link
Contributor Author

opened #405

@dirk-thomas
Copy link
Contributor

As shown in #406 this (together with #405) makes the specs pass with Atom 1.25.0-beta1.

Thank you for the patch!

@dirk-thomas dirk-thomas added this to the 0.8.4 milestone Feb 21, 2018
@dirk-thomas dirk-thomas changed the title Fix config path (close #401) Fix config path with Atom 1.25 Feb 21, 2018
@dirk-thomas dirk-thomas merged commit 0723007 into atom-community:master Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncaught Error: ENOENT: no such file or directory, open 'undefined/init.coffee'
3 participants