diff --git a/pkg/tools/shell.go b/pkg/tools/shell.go index 78ad2b26d..24e2ea1cf 100644 --- a/pkg/tools/shell.go +++ b/pkg/tools/shell.go @@ -35,7 +35,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).