File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
java/src/org/openqa/selenium/manager Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -70,21 +70,23 @@ public class SeleniumManager {
70
70
71
71
/** Wrapper for the Selenium Manager binary. */
72
72
private SeleniumManager () {
73
- Runtime .getRuntime ()
74
- .addShutdownHook (
75
- new Thread (
76
- () -> {
77
- if (binary != null && Files .exists (binary )) {
78
- try {
79
- Files .delete (binary );
80
- } catch (IOException e ) {
81
- LOG .warning (
82
- String .format (
83
- "%s deleting temporal file: %s" ,
84
- e .getClass ().getSimpleName (), e .getMessage ()));
73
+ if (managerPath == null ) {
74
+ Runtime .getRuntime ()
75
+ .addShutdownHook (
76
+ new Thread (
77
+ () -> {
78
+ if (binary != null && Files .exists (binary )) {
79
+ try {
80
+ Files .delete (binary );
81
+ } catch (IOException e ) {
82
+ LOG .warning (
83
+ String .format (
84
+ "%s deleting temporal file: %s" ,
85
+ e .getClass ().getSimpleName (), e .getMessage ()));
86
+ }
85
87
}
86
- }
87
- }));
88
+ }));
89
+ }
88
90
}
89
91
90
92
public static SeleniumManager getInstance () {
You can’t perform that action at this time.
0 commit comments