diff options
| author | zowoq <59103226+zowoq@users.noreply.github.com> | 2024-11-05 11:11:14 +1000 |
|---|---|---|
| committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2024-11-05 11:12:21 +1000 |
| commit | 6ff3a49ceb1c98e96452542a6feadacc477eedff (patch) | |
| tree | a2901fde649d2a0d2b911fb089ab7681bb543e0b /modules | |
| parent | 4652874d014b82cb746173ffc64f6a70044daa7e (diff) | |
time: shellcheck fix
https://www.shellcheck.net/wiki/SC2143
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/time/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/time/default.nix b/modules/time/default.nix index 28724a5..01c4703 100644 --- a/modules/time/default.nix +++ b/modules/time/default.nix @@ -7,7 +7,7 @@ let cfg = config.time; timeZone = optionalString (cfg.timeZone != null) '' - if [ -z $(systemsetup -listtimezones | grep "^ ${cfg.timeZone}$") ]; then + if ! systemsetup -listtimezones | grep -q "^ ${cfg.timeZone}$"; then echo "${cfg.timeZone} is not a valid timezone. The command 'listtimezones' will show a list of valid time zones." >&2 false fi |
