This repository was archived by the owner on Oct 28, 2024. It is now read-only.
File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ ## 0.1.9
2
+
3
+ - Add support for Chrome executables in ` CHROME_PATH ` .
4
+
1
5
## 0.1.8
2
6
3
7
- Log ` STDERR ` on Chrome launch failure.
Original file line number Diff line number Diff line change @@ -9,15 +9,17 @@ import 'dart:io';
9
9
import 'package:path/path.dart' as p;
10
10
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart' ;
11
11
12
- const _chromeEnvironment = 'CHROME_EXECUTABLE' ;
12
+ const _chromeEnvironments = [ 'CHROME_EXECUTABLE' , 'CHROME_PATH' ] ;
13
13
const _linuxExecutable = 'google-chrome' ;
14
14
const _macOSExecutable =
15
15
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' ;
16
16
const _windowsExecutable = r'Google\Chrome\Application\chrome.exe' ;
17
17
18
18
String get _executable {
19
- if (Platform .environment.containsKey (_chromeEnvironment)) {
20
- return Platform .environment[_chromeEnvironment];
19
+ for (var chromeEnv in _chromeEnvironments) {
20
+ if (Platform .environment.containsKey (chromeEnv)) {
21
+ return Platform .environment[chromeEnv];
22
+ }
21
23
}
22
24
if (Platform .isLinux) return _linuxExecutable;
23
25
if (Platform .isMacOS) return _macOSExecutable;
Original file line number Diff line number Diff line change 1
1
name : browser_launcher
2
2
description : Provides a standardized way to launch web browsers for testing and tools.
3
3
4
- version : 0.1.8
4
+ version : 0.1.9
5
5
6
6
homepage : https://github.com/dart-lang/browser_launcher
7
7
You can’t perform that action at this time.
0 commit comments