Skip to content

Commit

Permalink
Merge pull request #1145 from qowoz/shellcheck-timezone
Browse files Browse the repository at this point in the history
time: shellcheck fix
  • Loading branch information
Enzime authored Nov 5, 2024
2 parents 5d89120 + 6ff3a49 commit 2f05a81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/time/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f05a81

Please sign in to comment.