Skip to content

Instantly share code, notes, and snippets.

@ats
Created May 2, 2010 15:47
Show Gist options
  • Save ats/387222 to your computer and use it in GitHub Desktop.
Save ats/387222 to your computer and use it in GitHub Desktop.
# GitHub.tmbundle/Support/lib/gist.rb
# Modify def auth to use TM_GIT path
def auth
user = `$TM_GIT config --global github.user`.strip
token = `$TM_GIT config --global github.token`.strip
print user
user.empty? ? {} : { 'login' => user, 'token' => token }
end
@alanhogan
Copy link

For the record, this is a change from the current code which is:

def auth
  user  = `git config --global github.user`.strip
  token = `git config --global github.token`.strip

  user.empty? ? {} : { 'login' => user, 'token' => token }
end

and relates to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment