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: Allow --config to specify a custom configuration path #1378

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ErwannCodes
Copy link

Resolving the Issue: Using --config for a Custom Configuration Path
Problem: When a user specified the --config option with khal configure, the configuration file was always created in ~/.config/khal/config, even if a valid custom path was provided.

Identified Causes:

The value of --config was not correctly passed to configwizard.
Permissions for the specified path were not checked, leading to silent errors or failures.

Solution Provided
Correctly Passing --config:

The configure command now properly passes the --config value to configwizard.
configwizard uses this value to create or validate the configuration file.

Permission Handling:

If the specified path does not exist, it is automatically created.
If the necessary permissions are not available, a clear error message is displayed.

Handling Existing Files:

If a configuration file already exists at the specified path, a critical message is displayed, and the process is aborted to prevent overwriting.

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

Successfully merging this pull request may close these issues.

1 participant