diff --git a/src/atom-application.coffee b/src/atom-application.coffee index 41007a12f..f22756889 100644 --- a/src/atom-application.coffee +++ b/src/atom-application.coffee @@ -276,13 +276,21 @@ class AtomApplication if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath) resourcePath = @resourcePath - bootstrapScript = require.resolve('../spec/spec-bootstrap') + try + bootstrapScript = require.resolve(path.resolve(global.devResourcePath, 'spec', 'spec-bootstrap')) + catch error + bootstrapScript = require.resolve(path.resolve(__dirname, '..', 'spec', 'spec-bootstrap')) + isSpec = true devMode = true new AtomWindow({bootstrapScript, resourcePath, exitWhenDone, isSpec, devMode, specDirectory}) runBenchmarks: -> - bootstrapScript = 'benchmark/benchmark-bootstrap' + try + bootstrapScript = require.resolve(path.resolve(global.devResourcePath, 'benchmark', 'benchmark-bootstrap')) + catch error + bootstrapScript = require.resolve(path.resolve(__dirname, '..', 'benchmark', 'benchmark-bootstrap')) + isSpec = true # Needed because this flag adds the spec directory to the NODE_PATH new AtomWindow({bootstrapScript, @resourcePath, isSpec}) diff --git a/src/main.coffee b/src/main.coffee index 3b72edaab..fda609044 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -42,8 +42,8 @@ delegate.browserMainParts.preMainMessageLoopRun = -> args.pathsToOpen = args.pathsToOpen.map (pathToOpen) -> path.resolve(args.executedFrom ? process.cwd(), pathToOpen) + require('coffee-script') if args.devMode - require('coffee-script') require(path.join(args.resourcePath, 'src', 'coffee-cache')) require('module').globalPaths.push(path.join(args.resourcePath, 'src')) else