lib/gooddata/cli/hooks.rb in gooddata-0.6.18 vs lib/gooddata/cli/hooks.rb in gooddata-0.6.19

- old
+ new

@@ -15,14 +15,20 @@ creds = GoodData::Helpers::AuthHelper.read_credentials username = creds[:username] if username.nil? password = creds[:password] if password.nil? - token = creds[:auth_token] if token.nil? + token = creds[:auth_token] || creds[:token] if token.nil? global[:token] = token if global[:token].nil? - global[:login] = username if global[:login].nil? - global[:password] = password if global[:password].nil? + if global[:login].nil? + global[:login] = username + global['login'] = username + end + if global[:password].nil? + global[:password] = password + global['password'] = password + end # Pre logic here # Return true to proceed; false to abort and not call the # chosen command # Use skips_pre before a command to skip this block # on that command only