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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 1bc9eec..8e18087 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -248,7 +248,7 @@ sub run_command {
 
     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 {
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to