Skip to content

Better error message if config (and/or HOME) directory is not writeable #2683

Description

@wischi-chr

Is your feature request related to a problem? Please describe.
When gitui starts and there is no config and the home directory is write protected, it fails with an unspecific message: Error: Permission denied (os error 13) while trying to create folders and/or the config itself.

(Original Discussion for more context: #2682)

To Reproduce
(Simplest on Linux)

  1. Spawn a new shell with a different home directory (just change HOME env variable)
    which is not writable (for example owned by root)
  2. run gitui
  3. Result: Error: Permission denied (os error 13)

Describe the solution you'd like
A clear and concise description of what gitui failed to do. So in this case probably something like:

Failed to write config to /some/path/.config
Error: Permission denied (os error 13)

Describe alternatives you've considered
Not implementing it and let the user figure it out :-D
I personally used strace to find the issue because I first thought it had something to do with my terminal setup (see #2682)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions