Only require coffee file when available

Closes #3864
This commit is contained in:
Kevin Sawicki
2014-10-16 15:40:48 -07:00
parent c0843d467d
commit 6ed3ef3f60

View File

@@ -154,9 +154,9 @@ resolveModulePath = (relativePath, parentModule) ->
registerBuiltins = (devMode) ->
if devMode
cache.builtins.atom = path.join(cache.resourcePath, 'exports', 'atom.coffee')
else
cache.builtins.atom = path.join(cache.resourcePath, 'exports', 'atom.js')
atomCoffeePath = path.join(cache.resourcePath, 'exports', 'atom.coffee')
cache.builtins.atom = atomCoffeePath if fs.isFileSync(atomCoffeePath)
cache.builtins.atom ?= path.join(cache.resourcePath, 'exports', 'atom.js')
atomShellRoot = path.join(process.resourcesPath, 'atom')