Removes error

This commit is contained in:
Brian Zalewski 2023-12-25 02:39:45 +00:00
parent 4b0fc4bd16
commit b047499906

View file

@ -581,11 +581,11 @@ setTimezone() {
### Linux ### Linux
logg info 'Setting timezone to {{ .user.timezone }}' logg info 'Setting timezone to {{ .user.timezone }}'
sudo timedatectl set-timezone {{ .user.timezone }} sudo timedatectl set-timezone {{ .user.timezone }}
elif command -v m > /dev/null; then elif command -v systemsetup > /dev/null && [ -d /Applications ] && [ -d /System ]; then
### macOS ### macOS
logg info 'Setting timezone to {{ .user.timezone }}' && m timezone set {{ .user.timezone }} logg info 'Setting timezone to {{ .user.timezone }}' && sudo systemsetup -settimezone "{{ .user.timezone }}" 2>/dev/null 1>&2
else else
logg warn 'Neither timedatectl (Linux) or m (macOS) were found on the system' logg warn 'Neither timedatectl (Linux) or systemsetup (macOS) were found on the system'
fi fi
} }