Closed Mathew1988 closed 3 years ago
Hey @Mathew1988 , thanks for the report!
Based on the error message shown by date
, it seems that it's using the command built-in in MacOS, rather than the one provided by coreutils.
Could you please check the output of which date
and date --version
?
Also, could you try to add Homebrew's coreutils bin
folder in front of your PATH
and run the tests again? E.g.,
$ export PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
$ ./otp --run-tests
Let me know how it goes!
Hey.
You are right. The data which was used was localed at /bin/date
.
After adding the path in front of the PATH, everything is working fine.
Thanks a lot for the hint.
When I run the
bash otp --run-tests
the totp tests are failing. I'm running the command on a Mac Pro macOS Big Sur 11.1 (20C69) on Intel Chip. I have the recommended software installed (brew install coreutils openssl bash). See the output of the run-tests below:I changed the date command from
date +%s --date="@$dt_str"
todate -j -f "%Y-%M-%dT%TZ" "@$dt_str" "+%s"
, but this only resolved the date illegal option error.https://github.com/bfreis/otp/blob/e0d6117413dfd743bade0592d229df33a03c6f7b/otp#L27 https://github.com/bfreis/otp/blob/e0d6117413dfd743bade0592d229df33a03c6f7b/otp#L34 https://github.com/bfreis/otp/blob/e0d6117413dfd743bade0592d229df33a03c6f7b/otp#L199
The changes lead to the following output: