Guest User

Untitled

a guest
Jul 17th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. def github_user
  2. @github_user ||= begin
  3. github_user, shell_user = %x{git config --get github.user}.chomp, ENV['USER'].to_s
  4.  
  5. raise Exception, 'Unable to determine github user' if (github_user + shell_user).empty?
  6.  
  7. github_user.empty? ? shell_user : github_user
  8. end
  9. end
Add Comment
Please, Sign In to add comment