1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

gist: window's fix for broken clipboard

This commit is contained in:
John Mair 2013-01-16 17:31:03 +01:00
parent 6fdb393605
commit 19aa778526

View file

@ -83,8 +83,14 @@ class Pry
response = Jist.gist(content, :filename => filename || "pry_gist.rb", :public => !!opts[:p])
if response
url = response['html_url']
Jist.copy(url)
output.puts 'Gist created at URL, which is now in the clipboard: ', url
message = "Gist created at URL #{url}"
begin
Jist.copy(url)
message << ", which is now in the clipboard."
rescue Jist::ClipboardError
end
output.puts message
end
end
end