Skip to content

Conversation

linkmauve
Copy link

When the config or cache directories fail to get created for whichever reason, we currently exit gitui with a pretty undescriptive error.

This at least prints the relevant path so that the user can attempt to fix them.

Fixes #2652.

This Pull Request fixes/closes #2652.

It changes the following:

  • Prints the directory path to stderr when it fails to get created.

I followed the checklist:

  • I added unittests (not relevant)
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@linkmauve
Copy link
Author

Oops, #2684 already fixed half of this issue, I should have checked before opening it… @sobczal2, @cruessler, do you want to merge the cache half of this PR into the existing one, or just to merge this one and also credit @sobczal2?

@linkmauve
Copy link
Author

I’ve rebased on top of the now-merged #2684, using the same with_context() method and same error message.

Same as in 1d22485 for the config
directory, when the cache directory fails to get created for whichever
reason, we currently exit gitui with a pretty undescriptive error.

Improves on gitui-org#2684.
Fixes gitui-org#2652.
@linkmauve linkmauve changed the title Print a nicer error when failing to create xdg directories Print a nicer error when failing to create the cache directory Oct 6, 2025
Copy link
Collaborator

@cruessler cruessler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Successfully merging this pull request may close these issues.

Undescriptive error when ~/.config/gitui is a broken symlink
2 participants