diff --git a/Cargo.lock b/Cargo.lock index 4299f182..86748504 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1158,6 +1158,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "slab" version = "0.4.9" @@ -1248,6 +1254,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", + "shell-words", "svd2rust", "syn 2.0.42", "thiserror", diff --git a/ci/svd2rust-regress/Cargo.toml b/ci/svd2rust-regress/Cargo.toml index 10709734..da4b74f7 100644 --- a/ci/svd2rust-regress/Cargo.toml +++ b/ci/svd2rust-regress/Cargo.toml @@ -20,3 +20,4 @@ wildmatch = "2.1.1" which = "5.0.0" tracing = "0.1.40" tracing-subscriber = { version = "0.3.18", features = ["env-filter", "fmt"] } +shell-words = "1.1" \ No newline at end of file diff --git a/ci/svd2rust-regress/src/svd_test.rs b/ci/svd2rust-regress/src/svd_test.rs index 8ca31f33..6f1e0d9f 100644 --- a/ci/svd2rust-regress/src/svd_test.rs +++ b/ci/svd2rust-regress/src/svd_test.rs @@ -259,7 +259,9 @@ impl TestCase { let mut svd2rust_bin = Command::new(svd2rust_bin_path); if let Some(command) = command { if !command.is_empty() { - svd2rust_bin.arg(command); + svd2rust_bin.args( + shell_words::split(command).context("unable to split command into args")?, + ); } } svd2rust_bin