key-bindings that do not load get a warning

This commit is contained in:
Corey Johnson
2011-11-23 11:05:21 -05:00
parent a52f328c9d
commit f97eeb6e5d

View File

@@ -10,14 +10,13 @@ class KeyBinder
constructor: ->
@load require.resolve "key-bindings.coffee"
if fs.isFile "~/.atomicity/key-bindings.coffee"
@load "~/.atomicity/key-bindings.coffee"
register: (name, scope) ->
@load "~/.atomicity/key-bindings.coffee"
load: (path) ->
path = require.resolve path
return if not fs.isFile path
if not fs.isFile path
console.warn "Could not find keyBinding file '#{path}'"
return
try
# Watcher.watch path, =>