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

Make .clanvasrc file location configurable. #3

Closed
rowdyrotifer opened this issue Oct 13, 2018 · 1 comment
Closed

Make .clanvasrc file location configurable. #3

rowdyrotifer opened this issue Oct 13, 2018 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rowdyrotifer
Copy link
Owner

Currently, the .clanvasrc file is hardcoded to the user's home directory (~/.clanvasrc)

It would be nice if there were ways to specify alternate locations for those with custom configurations.

Add a function that resolves the path of the rcfile by using an approach with a series of fallbacks:

  1. Check if the user specifies a flag called --rc-file, if they do, use that option's value.
  2. If they do not specify that flag, then check an environment variable called CLANVASRCPATH, if they do, use that option's value.
  3. If they do not specify that environment variable, then simply use the current value: join(expanduser('~'), '.clanvasrc')

Use argparse. ArgumentParser to read the command-line arguments, and os.environ to read environment variables.

@rowdyrotifer rowdyrotifer added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 13, 2018
@rowdyrotifer
Copy link
Owner Author

Instead of this approach we'll go with the method described by issue #6 which gives more flexibility for other files as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant