always quote command since not only whitespaces require quoting

This commit is contained in:
Kris Heid 2021-03-02 10:11:00 +01:00
parent 0fe4484380
commit 423ccb3a89
1 changed files with 0 additions and 4 deletions

View File

@ -6,10 +6,6 @@ public class Bash {
}
public static String quote(String s) {
// Check that s contains no whitespace
if (s.matches("\\S+")) {
return s;
}
return "'" + s.replace("'", "'\\''") + "'";
}
}