chiark / gitweb /
dgit: clean mode: Correctly reject bad modes from config
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 Jun 2019 10:23:01 +0000 (11:23 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 11:45:38 +0000 (12:45 +0100)
Add the missing ^ and $ (which do not appear in $cleanmode_re).

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 920787457bd271b3aecef6d0eecb8c1f924d9200..40662b1b2f955b7a50d7804dcf69878d0250e5cf 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -7593,7 +7593,7 @@ sub parseopts_late_defaults () {
        $cleanmode //= 'dpkg-source';
 
        badcfg f_ "unknown clean-mode \`%s'", $cleanmode unless
-           $cleanmode =~ m/$cleanmode_re/;
+           $cleanmode =~ m/^$cleanmode_re$/;
     }
 
     $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF');