From 5d717eb7bd51aebe62257a7eeccff49cf990c57a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 21 Nov 2013 15:44:36 -0800 Subject: [PATCH] Load ~/.atom/user.js when available --- src/atom.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/atom.coffee b/src/atom.coffee index 39841c266..65a764747 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -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 = {}