From 4cf8749f9cab733fc3809d137043416efaeb0c69 Mon Sep 17 00:00:00 2001 From: Diego Giagio Date: Thu, 11 Oct 2018 22:17:31 -0400 Subject: [PATCH] Application name should not be included in CLI args Fixes #2 --- warp-runner/src/executor.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/warp-runner/src/executor.rs b/warp-runner/src/executor.rs index a12ca1c..757da82 100644 --- a/warp-runner/src/executor.rs +++ b/warp-runner/src/executor.rs @@ -16,9 +16,7 @@ pub fn execute(path: &Path, prog: &str) { _ => path_str }; - let mut args: Vec = env::args().collect(); - args[0] = prog.to_owned(); - + let args: Vec = env::args().skip(1).collect(); trace!("PATH={:?} prog={:?} args={:?}", path_env, prog, args); Command::new(prog) .env("PATH", path_env)