home-manager
home-manager copied to clipboard
make zsh session vars safer
Description
If the shell is launched with -u
flag, references to unset variables result in errors. Since in this case the variable is expected to be unset, there is no reason for this code to result in error. This commit prevents this potential error by providing a fallback value (the empty string) for the variable.
Checklist
-
[ ] Change is backwards compatible.
-
[ ] Code formatted with
./format
. -
[ ] Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes. -
[ ] Test cases updated/added. See example.
-
[ ] Commit messages are formatted like
{component}: {description} {long description}
See CONTRIBUTING for more information and recent commit messages for examples.
-
If this PR adds a new module
- [ ] Added myself as module maintainer. See example.