mirror of
https://github.com/revanced/jadb.git
synced 2024-06-02 11:26:12 +02:00
always quote command since not only whitespaces require quoting
This commit is contained in:
parent
0fe4484380
commit
423ccb3a89
|
@ -6,10 +6,6 @@ public class Bash {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String quote(String s) {
|
public static String quote(String s) {
|
||||||
// Check that s contains no whitespace
|
|
||||||
if (s.matches("\\S+")) {
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
return "'" + s.replace("'", "'\\''") + "'";
|
return "'" + s.replace("'", "'\\''") + "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user