From 204891e7c2a5cf8a0bd765202b0b8b4cbe538484 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Wed, 29 May 2019 22:20:44 -0700 Subject: [PATCH] Fix external args --- src/commands/classified.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commands/classified.rs b/src/commands/classified.rs index 4617d5f2ca..0418fcf2f6 100644 --- a/src/commands/classified.rs +++ b/src/commands/classified.rs @@ -129,12 +129,13 @@ impl ExternalCommand { input: ClassifiedInputStream, stream_next: StreamNext, ) -> Result { - let mut cmd = self.name.clone(); + let mut process = Exec::shell(&self.name); + for arg in self.args { - cmd.push_str(" "); - cmd.push_str(&arg); + process = process.arg(arg) } - let process = Exec::shell(&cmd).cwd(context.env.lock().unwrap().cwd()); + + process = process.cwd(context.env.lock().unwrap().cwd()); let mut process = match stream_next { StreamNext::Last => process,