Skip to content

Irrelevant error message when cache directory doesn't exist #908

@nhatzHK

Description

@nhatzHK

A directory not existing has nothing to do with reading the arch wiki.

🚛 warning:
Read damn arch-wiki before borking your computer:
https://wiki.archlinux.org/title/Arch_User_Repository
(Also, don't report any issues to pikaur, if ure seeing this message)

  File "/usr/lib/python3.14/site-packages/pikaur/main.py", line 528, in main
    create_dirs()
    ~~~~~~~~~~~^^
  File "/usr/lib/python3.14/site-packages/pikaur/main.py", line 408, in create_dirs
    mkdir(CacheRoot())
    ~~~~~^^^^^^^^^^^^^
  File "/usr/lib/python3.14/site-packages/pikaur/os_utils.py", line 130, in mkdir
    path.mkdir(parents=True)
    ~~~~~~~~~~^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/pathlib/__init__.py", line 1015, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/pathlib/__init__.py", line 1015, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.14/pathlib/__init__.py", line 1011, in mkdir
    os.mkdir(self, mode)
    ~~~~~~~~^^^^^^^^^^^^

PermissionError: [Errno 13] Permission denied: '/home/user/nonexistentdir'

A suggestion of a better message:

The path <path> set in the config for <config-key> does not exist and could not be created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions