Skip to content

Commit 8b1e6d1

Browse files
authored
Merge pull request #31 from browserstack/LOC_4190_stop_fix
Fix stop API to close binary with given identifier only
2 parents 69a6d56 + ae4228e commit 8b1e6d1

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/browserstack/local.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,16 @@ def start_command_args
150150
end
151151

152152
def stop_command
153-
"#{@binary_path} -d stop #{@local_identifier_flag}".strip
153+
if @local_identifier_flag
154+
return "#{@binary_path} -d stop -localIdentifier #{@local_identifier_flag}".strip
155+
else
156+
return "#{@binary_path} -d stop".strip
157+
end
154158
end
155159

156160
def stop_command_args
157-
args = ["#{@binary_path}", "-d", "stop", "#{@local_identifier_flag}"]
161+
args = ["#{@binary_path}", "-d", "stop"]
162+
args += ["-localIdentifier", "#{@local_identifier_flag}"] if @local_identifier_flag
158163
args = args.select {|a| a.to_s != "" }
159164
args.push(:err => [:child, :out])
160165
args

0 commit comments

Comments
 (0)