Skip to content

Commit

Permalink
Merge pull request #367 from jacobq/fix-appveyor
Browse files Browse the repository at this point in the history
Fix AppVeyor builds
  • Loading branch information
jacobq committed Oct 5, 2018
2 parents 2d509a5 + 5ad1865 commit a33e7e7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 12 additions & 4 deletions blueprints/ember-electron/index.js
Expand Up @@ -66,10 +66,18 @@ module.exports = class EmberElectronBlueprint extends Blueprint {

logger.startProgress('Installing electron build tools');

return efImport({
updateScripts: false,
outDir: 'electron-out',
})
return npmInstall.run({
// FIXME: Something seems to break in Windows with electron v3.0.0
// This is a hack to make electron-forge install electron 2.x instead of 'latest' (3.x) into the project
// See https://github.com/electron-userland/electron-forge/blob/5.x/src/api/import.js#L179
save: true,
verbose: false,
packages: ['electron@2.0.7'],
})
.then(() => efImport({
updateScripts: false,
outDir: 'electron-out',
}))
.then(() => npmInstall.run({
'save-dev': true,
verbose: false,
Expand Down
2 changes: 2 additions & 0 deletions lib/resources/shim-test-head.js
Expand Up @@ -4,6 +4,8 @@
// test-runner.js)
//
window.getTestemId = function() {
// FIXME: It should be safe to replace "\?" with "?" below due to context -- need to check though
// eslint-disable-next-line no-useless-escape
let match = window.location.search.match(/[\?&]testemId=([^\?&]+)/);

return match ? match[1] : null;
Expand Down
2 changes: 2 additions & 0 deletions test-runner.js
Expand Up @@ -59,6 +59,8 @@ if (require.main === module) {
'$1<head>',
'$1 <script>',
'$1 window.getTestemId = function() {',
// FIXME: It should be safe to replace "\?" with "?" below due to context -- need to check though
// eslint-disable-next-line no-useless-escape
'$1 var match = window.location.search.match(/[\?&]testemId=([^\?&]+)/);',
'$1 return match ? match[1] : null;',
'$1 }',
Expand Down

0 comments on commit a33e7e7

Please sign in to comment.