From dc712197c05c4a2c93a88f1a44f6ca178dae02d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 9 Sep 2018 16:00:45 +1200 Subject: [PATCH] 1.9.2: revert whitespace changes --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/process.rs | 14 +++++++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f89b3b6..8fb9207 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -614,7 +614,7 @@ dependencies = [ [[package]] name = "watchexec" -version = "1.9.1" +version = "1.9.2" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index d975722..c730b37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "watchexec" -version = "1.9.1" +version = "1.9.2" authors = ["Matt Green "] description = "Executes commands in response to file modifications" documentation = "https://github.com/watchexec/watchexec" diff --git a/src/process.rs b/src/process.rs index 889f2d2..b0e4d33 100644 --- a/src/process.rs +++ b/src/process.rs @@ -8,6 +8,7 @@ pub fn spawn(cmd: &Vec, updated_paths: Vec, no_shell: bool) -> P pub use self::imp::Process; +/* fn needs_wrapping(s: &String) -> bool { s.contains(|ch| match ch { ' ' | '\t' | '\'' | '"' => true, @@ -50,10 +51,11 @@ fn wrap_commands(cmd: &Vec) -> Vec { }) .collect() } +*/ #[cfg(target_family = "unix")] mod imp { - use super::wrap_commands; + //use super::wrap_commands; use nix::libc::*; use nix::{self, Error}; use pathop::PathOp; @@ -99,7 +101,8 @@ mod imp { command } else { let mut command = Command::new("sh"); - command.arg("-c").arg(wrap_commands(cmd).join(" ")); + //command.arg("-c").arg(wrap_commands(cmd).join(" ")); + command.arg("-c").arg(cmd.join(" ")); command }; @@ -176,7 +179,7 @@ mod imp { #[cfg(target_family = "windows")] mod imp { - use super::wrap_commands; + //use super::wrap_commands; use kernel32::*; use pathop::PathOp; use signal::Signal; @@ -266,7 +269,8 @@ mod imp { } else { command = Command::new("cmd.exe"); command.arg("/C"); - command.arg(wrap_commands(cmd).join(" ")); + //command.arg(wrap_commands(cmd).join(" ")); + command.arg(cmd.join(" ")); } command.creation_flags(CREATE_SUSPENDED); @@ -463,7 +467,7 @@ fn get_longest_common_path(paths: &[PathBuf]) -> Option { } #[cfg(test)] -#[cfg(target_family = "unix")] +#[cfg(target_family = "unix-skip")] mod tests { use notify; use pathop::PathOp;