mirror of
https://github.com/revanced/jadb.git
synced 2025-02-11 01:26:47 +01: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…
x
Reference in New Issue
Block a user