Application name should not be included in CLI args

Fixes #2
This commit is contained in:
Diego Giagio 2018-10-11 22:17:31 -04:00
parent ed6e2f8c30
commit 4cf8749f9c

View File

@ -16,9 +16,7 @@ pub fn execute(path: &Path, prog: &str) {
_ => path_str _ => path_str
}; };
let mut args: Vec<String> = env::args().collect(); let args: Vec<String> = env::args().skip(1).collect();
args[0] = prog.to_owned();
trace!("PATH={:?} prog={:?} args={:?}", path_env, prog, args); trace!("PATH={:?} prog={:?} args={:?}", path_env, prog, args);
Command::new(prog) Command::new(prog)
.env("PATH", path_env) .env("PATH", path_env)