Skip to content

Commit e31b12d

Browse files
committed
Fixes the jenkins plugin bug via stop method overloading
1 parent c72aaf8 commit e31b12d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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)