test: fix chrome detection in macOS Catalina (#6638)

This commit is contained in:
Xin Du (Clark) 2019-11-09 22:15:12 +00:00 committed by GitHub
parent 95303180a8
commit edd054e2ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -47,8 +47,8 @@ export default class ChromeDetector {
}
execSync(
`${LSREGISTER} -dump` +
' | grep -E -i \'(google chrome( canary)?|chromium).app$\'' +
' | awk \'{$1=""; print $0}\''
" | grep -E -i -o '/.+(google chrome( canary)?|chromium)\\.app(\\s|$)'" +
" | grep -E -v 'Caches|TimeMachine|Temporary|/Volumes|\\.Trash'"
)
.toString()
.split(newLineRegex)