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: Create config file if it does not exist #379

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

dbolson
Copy link
Contributor

@dbolson dbolson commented Jul 12, 2024

When running a command, if there isn't a config file then create one. Since most users will not want to specify their access token, etc. for each command, we can assume they will want a config file.

If we can't write the config file, fail silently. Then when running any config commands, the error will give more details.

You can test this by deleting or moving the ~/.config/ldcli/config.yml file and running ldcli config --list.

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Provide links to any issues in this repository or elsewhere relating to this pull request.

Describe the solution you've provided

Provide a clear and concise description of what you expect to happen.

Describe alternatives you've considered

Provide a clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context about the pull request here.

@dbolson dbolson requested a review from moribellamy July 12, 2024 22:35
@dbolson dbolson merged commit 3e672ab into main Jul 15, 2024
5 checks passed
@dbolson dbolson deleted the handle-missing-config-file branch July 15, 2024 17:53
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.

2 participants