Skip to content

Commit 0f51f1d

Browse files
author
Rajasegar
committed
[BUGFIX] read_gist to behave like api
1 parent 02ab846 commit 0f51f1d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: bin/gist

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ begin
173173

174174
if options.key? :read
175175
file_name = ARGV.first
176-
Gist.read_gist(options[:read], file_name)
176+
output = Gist.read_gist(options[:read], file_name)
177+
puts output if output
177178
exit
178179
end
179180

Diff for: lib/gist.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def read_gist(id, file_name=nil)
236236
file = files.values.first
237237
end
238238

239-
puts file["content"]
239+
file["content"]
240240
else
241241
raise Error, "Gist with id of #{id} does not exist."
242242
end

0 commit comments

Comments
 (0)