~reviewer/hello-hut

Crash when HOME is not set

hello-hut crashes in a minimal container where HOME is unset:

$ env -u HOME hello-hut
Traceback (most recent call last):
  ...
  File "hello_hut/config.py", line 12, in config_path
    base = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config")
KeyError: 'HOME'
Status
RESOLVED FIXED
Submitter
Ravi Menon (unverified)
Assignee
No-one
Submitted
5 months ago
Updated
5 months ago
Labels
bug

Dana Whitfield (unverified) REPORTED CONFIRMED 5 months ago · edit

Reproduced, thanks. hello-hut should simply skip the config file in that case.

Ines Moreau (unverified) 5 months ago · edit

Patch is on the list: config_path() now returns None and load_config() treats that as "no config".

Dana Whitfield (unverified) CONFIRMED FIXED 5 months ago · edit

Applied, thanks Ines!

Register here or Log in to comment, or comment via email.