This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=d462d716908250024e9487ac69b0ed69880eec95

commit d462d716908250024e9487ac69b0ed69880eec95
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Jun 26 06:17:15 2020 +0200

    dpkg-realpath: Check pathname argument after options parsing
    
    Fixes: commit 584d2a5575627f34dd796b550b09c590d34a79ae
---
 scripts/dpkg-realpath.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/dpkg-realpath.sh b/scripts/dpkg-realpath.sh
index 3b5136cfa..b3cdab608 100755
--- a/scripts/dpkg-realpath.sh
+++ b/scripts/dpkg-realpath.sh
@@ -117,8 +117,6 @@ canonicalize() {
 
 setup_colors
 
-[ $# -eq 1 ] || badusage "missing pathname"
-
 while [ $# -ne 0 ]; do
   case "$1" in
   --instdir|--root)
@@ -153,6 +151,8 @@ while [ $# -ne 0 ]; do
   shift
 done
 
+[ -n "$pathname" ] || badusage "missing pathname"
+
 canonicalize "$pathname" "${DPKG_ROOT:-}"
 
 exit 0

-- 
Dpkg.Org's dpkg

Reply via email to