macOS: Auto detection of executable path when CHROME_PATH has pointed .app
folder
#460
Labels
enhancement
New feature or request
.app
folder
#460
For setting custom Chrome path,
CHROME_PATH
environment value requires the path for an executable binary.In macOS, a common mistake is setting the path for the app
/Applications/Google Chrome.app
.xxx.app
is actually a special directory, not an executable file. A user should set/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
instead.Having said that, the detail of
.app
is hidden to OS users unless an explicit action. It's natural to think users that setting/Applications/Google Chrome.app
is working well.So it's helpful to provide auto-detection of executable path for macOS when filled all following conditions:
os.platform()
is'darwin'
.CHROME_PATH
env has been set a string that has an ending.app
+ optional trailing slash.(await fsPromise.stat(env.CHROME_PATH)).isDirectory()
istrue
.For example,
/foo/bar/ABCDEF.app
will resolve as/foo/bar/ABCDEF.app/Contents/MacOS/ABCDEF
.We may have to check
./Contents/Info.plist
to detect whetherCFBundlePackageType
isAAPL
for more strict detection.The text was updated successfully, but these errors were encountered: