mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Load ~/.atom/user.js when available
This commit is contained in:
@@ -307,11 +307,11 @@ class Atom
|
||||
@rootView.trigger 'beep'
|
||||
|
||||
requireUserInitScript: ->
|
||||
userInitScriptPath = path.join(@getConfigDirPath(), "user.coffee")
|
||||
try
|
||||
require userInitScriptPath if fs.isFileSync(userInitScriptPath)
|
||||
catch error
|
||||
console.error "Failed to load `#{userInitScriptPath}`", error.stack, error
|
||||
if userInitScriptPath = fs.resolve(@getConfigDirPath(), 'user', ['js', 'coffee'])
|
||||
try
|
||||
require userInitScriptPath
|
||||
catch error
|
||||
console.error "Failed to load `#{userInitScriptPath}`", error.stack, error
|
||||
|
||||
requireWithGlobals: (id, globals={}) ->
|
||||
existingGlobals = {}
|
||||
|
||||
Reference in New Issue
Block a user