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

Allow the .config "folder" to be configurable or changed. #111

Open
3rd-Eden opened this issue May 22, 2015 · 6 comments
Open

Allow the .config "folder" to be configurable or changed. #111

3rd-Eden opened this issue May 22, 2015 · 6 comments

Comments

@3rd-Eden
Copy link

We've just ran in to an issue where .config as actually a configuration file for a different application causing the workshopper to fail with ENOTADIRFUCKYOU error message. It would be nice to handle these problems more gracefully by either falling back to a different configuration folder name or allowing users to specify the configuration folder with like --config CLI flag.

Affected lines:

this.globalDataDir = util.userDir('.config', 'workshopper')
this.dataDir = util.userDir('.config', this.appName)

@rvagg
Copy link
Contributor

rvagg commented May 27, 2015

I've switched https://github.com/rvagg/ghauth to http://ghub.io/application-config thanks to a PR from @LinusU, perhaps he'd like to do the same here? I'd be happy to see .config changed to a cross-platform compatible solution.

@LinusU
Copy link

LinusU commented May 27, 2015

I'd be happy to send a pull request 👍

Hopefully I can find some time this weekend

@3rd-Eden
Copy link
Author

Well the application-config still defaults to .config for windows which will result in the same issue.

@martinheidegger
Copy link
Contributor

@3rd-Eden Just to be clear: The path that results in a ENOTADIRFUCKYOU error is %USER_DIR%/.config If we were to start using application-config that directory would change to % LOCALAPPDATA%/workshopper/config.json Which is would resolve your issue.

And that is where its actually a bit hairy with this PR:

  1. Please make sure it has legacy support (i.e. if there is a .config directory that contains workshopper data, read it.
  2. To not have a conflict with different applications I think the workshoppers naming should have npm namespacing: i.e. npm-js-workshopper or Nodejs-npm-workshopper or so that should make sure that no other "Workshopper" app uses the same storage folder.

Sidenote: Pinging @gangstead and @Sequoia because I think it would be a good section in a command line workshopper ...

@gangstead
Copy link

I think @Sequoia's clijs because it covers all things command line in a more comprehensive fashion. comder just focuses on the commander.js library.

@Sequoia
Copy link

Sequoia commented May 27, 2015

@martinheidegger tyvm. I was planning a section on RC files but this would be a good complement to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants