diff --git a/lib/gist.rb b/lib/gist.rb index ac27ec8..bc30d06 100644 --- a/lib/gist.rb +++ b/lib/gist.rb @@ -44,7 +44,7 @@ class ClipboardError < RuntimeError; include Error end # # @return [String] string value of access token or `nil`, if not found def auth_token - @token ||= File.read(auth_token_file) rescue nil + @token ||= File.read(auth_token_file).chomp rescue nil end # Upload a gist to https://gist.github.com