OSDN Git Service
(root)
/
osdn-codes
/
osdn-cli.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38728c7
)
Fix error on user has no credential.
author
Tatsuki Sugiura
<sugi@nemui.org>
Tue, 22 Mar 2016 09:26:03 +0000
(18:26 +0900)
committer
Tatsuki Sugiura
<sugi@nemui.org>
Tue, 22 Mar 2016 09:26:03 +0000
(18:26 +0900)
lib/osdn/cli.rb
patch
|
blob
|
history
diff --git
a/lib/osdn/cli.rb
b/lib/osdn/cli.rb
index
dc5faa7
..
b397d10
100644
(file)
--- a/
lib/osdn/cli.rb
+++ b/
lib/osdn/cli.rb
@@
-83,6
+83,10
@@
module OSDN
def update_token
logger.debug "Checking token expires..."
load_credential
+ unless credential.access_token
+ logger.fatal "You have no access token. Please login with '#{$0} login'."
+ return
+ end
if credential.expires_at > Time.now + 30
logger.debug "You have valid access token, skip to refresh."
return