Skip to content

Commit d3d3b4e

Browse files
committed
fixes travis issues
1 parent 216f885 commit d3d3b4e

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lib/Local.php

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,26 +113,22 @@ public function stop() {
113113
fclose($this->pipes[1]);
114114
fclose($this->pipes[2]);
115115

116-
echo `ps aux| grep BrowserStackLocal`;
117-
echo `lsof -i:45691`;
118-
echo $this->pid;
119-
120116
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
121117
exec('kill -15 ' . $this->pid);
122118

123119
proc_terminate($this->handle);
124-
//proc_close($this->handle);
125-
echo `ps aux| grep BrowserStackLocal`;
126-
echo `lsof -i:45691`;
127-
echo $this->pid;
128-
129120
while($this->isRunning())
130121
sleep(1);
131122
}
132123
}
133124

134125
public function command() {
135-
$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_flag $this->verbose_flag $this->hosts";
126+
$exec = "exec";
127+
// TODO to test on windows
128+
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
129+
$exec = "call";
130+
131+
$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_flag $this->verbose_flag $this->hosts";
136132
$command = preg_replace('/\s+/S', " ", $command);
137133
return $command;
138134
}

0 commit comments

Comments
 (0)