diff --git a/rox.code-workspace b/rox.code-workspace new file mode 100644 index 0000000..8f5f33f --- /dev/null +++ b/rox.code-workspace @@ -0,0 +1,12 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": { + "rust-analyzer.linkedProjects": [ + "./Cargo.toml" + ] + } +} diff --git a/src/execution.rs b/src/execution.rs index 98e566e..651f18e 100644 --- a/src/execution.rs +++ b/src/execution.rs @@ -1,6 +1,5 @@ //! This is the module responsible for executing tasks. use crate::models::Task; -use crate::utils; use std::collections::HashMap; use std::process::{Command, ExitStatus}; @@ -43,12 +42,13 @@ pub fn run_task(task: &Task) -> TaskResult { let start = std::time::Instant::now(); let workdir = task.workdir.clone().unwrap_or(".".to_string()); + let command = task.command.as_ref().unwrap(); - println!("> Running command: '{}'", task.command.as_ref().unwrap()); - let (command, args) = utils::split_head_from_rest(task.command.as_ref().unwrap()); - let command_results = Command::new(command) + println!("> Running command: '{}'", command); + let command_results = Command::new("sh") .current_dir(workdir) - .args(args) + .arg("-c") + .arg(command) .status(); TaskResult {