diff --git a/pkg/tools/shell.go b/pkg/tools/shell.go index 6ee1cb993..d2971f3f8 100644 --- a/pkg/tools/shell.go +++ b/pkg/tools/shell.go @@ -52,7 +52,7 @@ var ( regexp.MustCompile(`\brmdir\s+/s\b`), // Match disk wiping commands (must be followed by space/args) regexp.MustCompile( - `\b(format|mkfs|diskpart)\b\s`, + `(^|[^-\w])\b(format|mkfs|diskpart)\b\s`, ), regexp.MustCompile(`\bdd\s+if=`), // Block writes to block devices (all common naming schemes).