diff --git a/src/task/mod.rs b/src/task/mod.rs index 5c316cf76..26853bda2 100644 --- a/src/task/mod.rs +++ b/src/task/mod.rs @@ -228,7 +228,7 @@ pub fn quote(in_str: &str) -> Cow { "\"\"".into() } else if in_str .bytes() - .any(|c| matches!(c as char, '\t' | '\r' | '\n' | ' ')) + .any(|c| matches!(c as char, '\t' | '\r' | '\n' | ' ' | '[' | ']')) { let mut out: Vec = Vec::new(); out.push(b'"'); @@ -267,5 +267,6 @@ mod test { quote("PATH=\"$PATH;build/Debug\""), "PATH=\"$PATH;build/Debug\"" ); + assert_eq!(quote("name=[64,64]"), "\"name=[64,64]\""); } }