From 3bf1ed419533a9ab66254e509a55af34e8a7ad0f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 24 Oct 2023 23:56:00 +0200 Subject: [PATCH] df: Replace the error message by the one generated by clap Failed with: -df: options OPT and --output are mutually exclusive -Try 'df --help' for more information. +error: the argument '--inodes' cannot be used with '--output[=...]' + +Usage: df [OPTION]... [FILE]... --- util/build-gnu.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 0af07266b..7c0691c06 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -269,6 +269,8 @@ sed -i -E "s|^([^#]*2_31.*)$|#\1|g" tests/printf/printf-cov.pl sed -i -e "s/du: invalid -t argument/du: invalid --threshold argument/" -e "s/du: option requires an argument/error: a value is required for '--threshold ' but none was supplied/" -e "/Try 'du --help' for more information./d" tests/du/threshold.sh +awk 'BEGIN {count=0} /compare exp out2/ && count < 6 {sub(/compare exp out2/, "grep -q \"cannot be used with\" out2"); count++} 1' tests/df/df-output.sh > tests/df/df-output.sh.tmp && mv tests/df/df-output.sh.tmp tests/df/df-output.sh + # with ls --dired, in case of error, we have a slightly different error position sed -i -e "s|44 45|48 49|" tests/ls/stat-failed.sh