Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle error where BSD date is being used #164

Merged
merged 2 commits into from
Apr 27, 2024
Merged

Conversation

tomice
Copy link
Collaborator

@tomice tomice commented Apr 20, 2024

  • Users on macOS and other older distributions of Linux and Unix cannot fully utilize this application as a handful of date/time strings in here are specific to the GNU utility found on most modern version of Linux.

    Until every date/time case is handled between the BSD version of date and the GNU version of date, let's error out akin to how we do it if the user doesn't have every utility installed to run this script.

    Users can get around this by using package managers on macOS such as homebrew, macports, etc and making sure that 'date' points to the GNU version of date instead of the BSD version. Linux and Unix users can get around this by installing the GNU version of date, as well.

  • Removed checking OSTYPE in the format_date() function as checking if someone is on a machine that identifies as Darwin is not enough to handle other edge cases where an older version of BSD date might be present on the system.

Important: While this does not close tickets like #160 and #163 (these two tickets should be combined as it's the same bug), it should hopefully prevent further tickets from being created and avoid overall confusion as to what's going on.

* Users on macOS and other older distributions of Linux and Unix
  cannot fully utilize this application as a handful of date/time
  strings in here are specific to the GNU utility found on most
  modern version of Linux.

  Until every date/time case is handled between the BSD version of
  date and the GNU version of date, let's error out akin to how we
  do it if the user doesn't have every utility installed to run
  this script.

  Users can get around this by using package managers on macOS such
  as homebrew, macports, etc and making sure that 'date' points to
  the GNU version of date instead of the BSD version. Linux and
  Unix users can get around this by installing the GNU version of
  date, as well.

* Removed checking OSTYPE in the format_date() function as checking
  if someone is on a machine that identifies as Darwin is not enough
  to handle other edge cases where an older version of BSD date
  might be present on the system.
* When running "make test" in the root directory of this codebase,
  an error will occur as this shell script requires a repo to be
  initialized before it can properly execute.

  This was done in the past, but at some point, it was removed.
  This adds the feature back, tests if we are in a git directory
  by using a built-in git command, and only performs this action
  if a git repo doesn't already exist. All actions are sent to
  /dev/null so the testing should look opaque to the end user.

  Note that tests will still fail if a user is missing a required
  utility to perform the functionality of git-quick-stats.

* Fixed a typo in the man page

Fixes arzzen#162
@tomice
Copy link
Collaborator Author

tomice commented Apr 20, 2024

Added another commit to fix #162

@tomice tomice merged commit 00d13c0 into arzzen:master Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants