home-manager/home-manager
Gaurav Juvekar 89670e27e1
home-manager: ignore hostname -f lookup errors
`hostname -f` could fail depending on the resolver. Discard any stderr
and test for the exit status before using the value for flake attribute
lookup.

I was unable to repro the exact bad exit status in #5665.
With
  - nscd disabled,
  - nsswitch.conf pointing to 'files',
  - hostname entry removed from /etc/hosts
`hostname -f` from inetutils-2.5 fell back to showing just the nodename
from `uname(2)`. Injecting an empty string into the
`(struct utsname).nodename` field of `uname(2)` using strace still
exited with empty output and 0 exit-status.

Fixes #5665
2024-07-28 21:21:23 -07:00
..
po Translate using Weblate (Hungarian) 2024-07-07 06:49:29 +02:00
build-news.nix home-manager: rework news command 2023-07-31 12:43:36 +02:00
completion.bash home-manager: fix some completions commands 2023-09-10 11:35:41 +02:00
completion.fish home-manager: pass --refresh to nix (#3624) 2023-02-05 11:14:03 +01:00
completion.zsh home-manager: fix some completions commands 2023-09-10 11:35:41 +02:00
default.nix home-manager: handle profile list in Nix >2.17 2023-08-13 01:18:17 +02:00
home-manager home-manager: ignore hostname -f lookup errors 2024-07-28 21:21:23 -07:00
home-manager.nix home-manager: rework news command 2023-07-31 12:43:36 +02:00
install.nix home-manager: add init command to main tool 2023-03-15 22:47:04 +01:00