sw icon indicating copy to clipboard operation
sw copied to clipboard

fix: Fix warning on FreeBSD

Open ehaupt opened this issue 1 year ago • 0 comments

FreeBSD's date command does not have a --version option and therefore prints an error during the version detection:

# sw
date: illegal option -- -
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
            [ -z output_zone ] [-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
            [[[[[[cc]yy]mm]dd]HH]MM[.SS] | new_date] [+output_fmt]
0:00:01^C

This can be easily fixed by sending stderr to /dev/null.

ehaupt avatar Apr 08 '24 08:04 ehaupt