mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-08 17:17:56 +08:00
fix(spectron): reenable for Linux and choose executablePath based on platform
This commit is contained in:
parent
c21e9d61ed
commit
2f39668fd0
1 changed files with 8 additions and 4 deletions
|
@ -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}")
|
||||
|
|
Loading…
Reference in a new issue