mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
fix: msys2 path (github #12)
This commit is contained in:
parent
6feb88d48f
commit
659235bf2e
5 changed files with 80 additions and 13 deletions
|
|
@ -153,6 +153,9 @@ pub fn eval_shell_command(shell: &str, command: &str) -> Vec<String> {
|
|||
}
|
||||
|
||||
pub fn split_command(command: &str) -> Vec<String> {
|
||||
if cfg!(debug_assertions) {
|
||||
eprintln!("command: {command}")
|
||||
}
|
||||
// this regex splits the command separated by spaces, except when the space
|
||||
// is escaped by a backslash or surrounded by quotes
|
||||
let regex = r#"([^\s"'\\]+|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\\ )+|\\|\n"#;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue