katernet / darkmode

Set macOS dark mode and Alfred dark theme at sunset
GNU General Public License v3.0
149 stars 10 forks source link

"Error: Invalid arguments" when setting either parameter to 0800 #23

Closed jSadoski closed 4 years ago

jSadoski commented 4 years ago

Using parameters like ./darkmode.sh 0800 1930 produces this error:

Error: Invalid arguments. Usage: ./darkmode.sh HHMM HHMM
Exiting.

When testing each parameter evaluation individually (from line 281), this evaluation:

if (( $1 >= 0 && $1 <= 2400 )) && (( $2 >= 0 && $2 <= 2400 )); then

produces the error: ((: 0800: value too great for base (error token is "0800")

8 is being processed as an octal, not base 10.