Skip to content

Commit caaa4c6

Browse files
committed
fix-#527
1 parent 0f65753 commit caaa4c6

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

Cargo.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ structopt = "0.3.20"
2222
async-std = "1.7.0"
2323
futures = "0.3"
2424
rlimit = "0.8.3"
25-
shell-words = "1.0.0"
2625
log = "0.4.0"
2726
env_logger = "0.8.2"
2827
dirs = "3.0.1"

src/main.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
#![warn(clippy::pedantic)]
33
#![allow(clippy::doc_markdown, clippy::if_not_else, clippy::non_ascii_literal)]
44

5-
extern crate shell_words;
6-
75
mod tui;
86

97
mod input;

src/scripts/mod.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,14 @@ impl Script {
233233
}
234234
debug!("\nScript format to run {}", to_run);
235235

236-
let arguments = shell_words::split(&to_run).expect("Failed to parse script arguments");
237-
238-
execute_script(arguments)
236+
execute_script(&to_run)
239237
}
240238
}
241239

242240
#[cfg(not(tarpaulin_include))]
243-
fn execute_script(mut arguments: Vec<String>) -> Result<String> {
244-
debug!("\nScript arguments vec: {:?}", &arguments);
245-
let process = Exec::cmd(arguments.remove(0)).args(&arguments);
241+
fn execute_script(script: &str) -> Result<String> {
242+
debug!("\nScript arguments {}", script);
243+
let process = Exec::shell(script);
246244
match process.capture() {
247245
Ok(c) => {
248246
let es = match c.exit_status {

0 commit comments

Comments
 (0)