Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def github_user
- @github_user ||= begin
- github_user, shell_user = %x{git config --get github.user}.chomp, ENV['USER'].to_s
- raise Exception, 'Unable to determine github user' if (github_user + shell_user).empty?
- github_user.empty? ? shell_user : github_user
- end
- end
Add Comment
Please, Sign In to add comment