From 227d8f03efe46dd8351bcb598b5ec33360eec7a6 Mon Sep 17 00:00:00 2001 From: Nidhi Makhijani Date: Thu, 5 May 2016 17:48:31 +0530 Subject: [PATCH] quotes --- lib/Local.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Local.php b/lib/Local.php index e24e0d4..21ed83f 100644 --- a/lib/Local.php +++ b/lib/Local.php @@ -89,7 +89,11 @@ public function start($arguments) { ); $call = $this->command(); - system('echo "" > '. $this->logfile); + if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') + system('echo "" > '. '$this->logfile'); + else + system("echo \"\" > '$this->logfile' "); + $this->handle = proc_open($call, $descriptorspec, $this->pipes); $status = proc_get_status($this->handle); $this->pid = $status['pid']; @@ -146,7 +150,7 @@ public function command() { $exec = "call"; $user_args = join(' ', $this->user_args); - $command = "$exec $this->binary_path -logFile $this->logfile $this->folder_flag $this->key $this->folder_path $this->force_local_flag $this->local_identifier_flag $this->only_flag $this->only_automate_flag $this->proxy_host $this->proxy_port $this->proxy_user $this->proxy_pass $this->force_proxy_flag $this->force_flag $this->verbose_flag $this->hosts $user_args"; + $command = "$exec $this->binary_path -logFile '$this->logfile' $this->folder_flag $this->key $this->folder_path $this->force_local_flag $this->local_identifier_flag $this->only_flag $this->only_automate_flag $this->proxy_host $this->proxy_port $this->proxy_user $this->proxy_pass $this->force_proxy_flag $this->force_flag $this->verbose_flag $this->hosts $user_args"; $command = preg_replace('/\s+/S', " ", $command); return $command; }