]> git.proxmox.com Git - pve-common.git/commitdiff
fix a regex typo in run_command
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 May 2015 07:27:14 +0000 (09:27 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 May 2015 08:28:44 +0000 (10:28 +0200)
m/|/ is always true as it effectively matches 'nothing or nothing
anywhere in a string'
looks like it was supposed to be m/\|/

src/PVE/Tools.pm

index 1bc9eec6afa857926e62626747318268f4d21ed6..8e18087ab788634307ae24f69b5b836e75b3a2c5 100644 (file)
@@ -248,7 +248,7 @@ sub run_command {
 
     if (!ref($cmd)) {
        $cmdstr = $cmd;
 
     if (!ref($cmd)) {
        $cmdstr = $cmd;
-       if ($cmd =~ m/|/) {
+       if ($cmd =~ m/\|/) {
            # see 'man bash' for option pipefail
            $cmd = [ '/bin/bash', '-c', "set -o pipefail && $cmd" ];
        } else {
            # see 'man bash' for option pipefail
            $cmd = [ '/bin/bash', '-c', "set -o pipefail && $cmd" ];
        } else {