sw
sw copied to clipboard
fix: Fix warning on FreeBSD
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.