Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
af-coffee.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add .editorconfig
[af-coffee.git]
/
client.coffee
diff --git
a/client.coffee
b/client.coffee
index
13641e9
..
02d28c1
100755
(executable)
--- a/
client.coffee
+++ b/
client.coffee
@@
-197,7
+197,15
@@
get_token = (callback) ->
else
callback null, token
else
callback null, token
-login = (callback) ->
+login_callbacks = []
+login = (real_callback) ->
+ login_callbacks.push real_callback
+ return if login_callbacks.length > 1
+
+ callback = (err, token) ->
+ while login_callbacks.length > 0
+ login_callbacks.shift()(err, token)
+
async.waterfall [
(callback) => async.series [
(callback) => @ask prompt: 'username: ', callback
async.waterfall [
(callback) => async.series [
(callback) => @ask prompt: 'username: ', callback