Skip to content

fix: Create config file if it does not exist#379

Merged
dbolson merged 2 commits into
mainfrom
handle-missing-config-file
Jul 15, 2024
Merged

fix: Create config file if it does not exist#379
dbolson merged 2 commits into
mainfrom
handle-missing-config-file

Conversation

@dbolson
Copy link
Copy Markdown
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
@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