From 2f39668fd04f952c1c3ced38428012b3f95a8fdf Mon Sep 17 00:00:00 2001 From: mbilker Date: Mon, 23 Nov 2015 22:53:59 -0500 Subject: [PATCH] fix(spectron): reenable for Linux and choose executablePath based on platform --- build/tasks/spec-task.coffee | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build/tasks/spec-task.coffee b/build/tasks/spec-task.coffee index 13a3c9e9e..39967aa9c 100644 --- a/build/tasks/spec-task.coffee +++ b/build/tasks/spec-task.coffee @@ -33,14 +33,18 @@ module.exports = (grunt) -> grunt.registerTask 'run-spectron-specs', 'Run spectron specs', -> shellAppDir = grunt.config.get('nylasGruntConfig.shellAppDir') - executablePath = path.join(shellAppDir, 'Contents', 'MacOS', 'Nylas') + + if process.platform is 'darwine' + executablePath = path.join(shellAppDir, 'Contents', 'MacOS', 'Nylas') + else + executablePath = path.join(shellAppDir, 'nylas') done = @async() npmPath = path.resolve "./build/node_modules/.bin/npm" - if process.platform isnt 'darwin' - grunt.log.error("run-spectron-specs only works on Mac OS X at the moment.") - done(false) + #if process.platform isnt 'darwin' + # grunt.log.error("run-spectron-specs only works on Mac OS X at the moment.") + # done(false) if not fs.existsSync(executablePath) grunt.log.error("run-spectron-specs requires the built version of the app at #{executablePath}")