Skip to content

Commit

Permalink
Added Windows 10 without Chrome Canary support (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricedb authored and paulirish committed Sep 22, 2016
1 parent 8c17a10 commit 3f5c43f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
*.js eol=lf
19 changes: 12 additions & 7 deletions lighthouse-cli/chrome-finder.js
Expand Up @@ -67,18 +67,23 @@ module.exports = {

win32() {
const installations = [];
const suffix = '\\Google\\Chrome SxS\\Application\\chrome.exe';
const suffixes = [
'\\Google\\Chrome SxS\\Application\\chrome.exe',
'\\Google\\Chrome\\Application\\chrome.exe'
];
let prefixes = [
process.env.LOCALAPPDATA,
process.env.PROGRAMFILES,
process.env['PROGRAMFILES(X86)']
];
for (let i = 0; i < prefixes.length; i++) {
const chromeCanaryPath = path.join(prefixes[i], suffix);
if (canAccess(chromeCanaryPath)) {
installations.push(chromeCanaryPath);
}
}
prefixes.forEach(prefix =>
suffixes.forEach(suffix => {
const chromePath = path.join(prefix, suffix);
if (canAccess(chromePath)) {
installations.push(chromePath);
}
})
);
return installations;
}
};
Expand Down

0 comments on commit 3f5c43f

Please sign in to comment.