threads / patch / 2509

patchcg-clean: fix argument processing

Subject: [PATCH] cg-clean: fix argument processing

## tl;dr

One message between Nov 14, 2005 and Nov 14, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Pavel Roskin· Nov 14, 2005, 20:03 UTC · lore

cg-clean was broken by the "robustified usage checks". This patch restores the old behavior, i.e. cg-clean reports errors if there is anything but switches on the command line. Empty arguments are rejected now as well.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Show changes to cg-clean +1 −1
diff --git a/cg-clean b/cg-clean
index f680aee..1cc1ae8 100755
--- a/cg-clean
+++ b/cg-clean
@@ -44,7 +44,7 @@ while optparse; do
 	fi
 done
 
-[ ${#ARGS[*]} -ge 1 ] || usage
+[ ${#ARGS[*]} = 0 ] || usage
 
 
 clean_dirs()
-- 
Regards,
Pavel Roskin

← back to recent threads