fix: default_app incorrect loading by url (#14940)

This commit is contained in:
Shelley Vohr 2018-10-03 08:10:22 -07:00 committed by GitHub
parent 596ae2c2df
commit 47258f7b3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,7 +155,11 @@ if (option.file && !option.webdriver) {
if (protocol === 'http:' || protocol === 'https:' || protocol === 'file:' || protocol === 'chrome:') {
loadApplicationByUrl(file)
} else if (extension === '.html' || extension === '.htm') {
loadApplicationByUrl('file://' + path.resolve(file))
loadApplicationByUrl(url.format({
protocol: 'file:',
slashes: true,
pathname: path.resolve(file)
}))
} else {
loadApplicationPackage(file)
}