Skip to content

Commit ded2478

Browse files
rchlpimlie
authored andcommitted
fix(detection): Invalid Chrome detection command (#37)
There must be no newlines in the command string or it will fail executing.
1 parent c7f91d0 commit ded2478

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils/detectors/chrome.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ export default class ChromeDetector {
4444
if (customChromePath) {
4545
installations.push(customChromePath)
4646
}
47-
execSync(`
48-
${LSREGISTER} -dump
49-
| grep -E -i -o '/.+(google chrome( canary)?|chromium)\\.app(\\s|$)'
50-
| grep -E -v 'Caches|TimeMachine|Temporary|/Volumes|\\.Trash'
51-
`)
47+
execSync(
48+
`${LSREGISTER} -dump` +
49+
" | grep -E -i -o '/.+(google chrome( canary)?|chromium)\\.app(\\s|$)'" +
50+
" | grep -E -v 'Caches|TimeMachine|Temporary|/Volumes|\\.Trash'"
51+
)
5252
.toString()
5353
.split(newLineRegex)
5454
.forEach((inst) => {

0 commit comments

Comments
 (0)