Skip to content

Commit c66b958

Browse files
authored
Merge pull request #21 from punitx/jenkins_plugin_fix
Fixes the Jenkins plugin bug via stop method overloading
2 parents c72aaf8 + 89ac0ec commit c66b958

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.browserstack</groupId>
55
<artifactId>browserstack-local-java</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.0.1</version>
7+
<version>1.0.2</version>
88

99
<name>browserstack-local-java</name>
1010
<description>Java bindings for BrowserStack Local</description>

src/main/java/com/browserstack/local/Local.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,23 @@ public void stop() throws Exception {
9999
}
100100
}
101101

102+
/**
103+
* Stops the Local instance specified by the given identifier
104+
* @param options Options supplied for the Local instance
105+
**/
106+
public void stop(Map<String, String> options) throws Exception {
107+
if (options.get("binarypath") != null) {
108+
binaryPath = options.get("binarypath");
109+
} else {
110+
LocalBinary lb = new LocalBinary();
111+
binaryPath = lb.getBinaryPath();
112+
}
113+
makeCommand(options, "stop");
114+
proc = runCommand(command);
115+
proc.waitFor();
116+
pid = 0;
117+
}
118+
102119
/**
103120
* Checks if Local instance is running
104121
*

0 commit comments

Comments
 (0)