Skip to content

Commit

Permalink
Updating oauth_client.rb to allow username supplied by -u flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjbones committed Oct 20, 2018
1 parent 2f84302 commit b7f1f8a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/twurl/oauth_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ def rcfile(reload = false)
def load_from_options(options)
if rcfile.has_oauth_profile_for_username_with_consumer_key?(options.username, options.consumer_key)
load_client_for_username_and_consumer_key(options.username, options.consumer_key)
elsif options.username || (options.command == 'authorize')
elsif options.username
load_client_for_username(options.username)
elsif (options.command == 'authorize')
load_new_client_from_options(options)
else
load_default_client
Expand Down

0 comments on commit b7f1f8a

Please sign in to comment.