[pve-devel] [PATCH] fix a regex typo in run_command

Wolfgang Bumiller w.bumiller at proxmox.com
Thu May 28 09:27:14 CEST 2015


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





More information about the pve-devel mailing list