Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 7391df2

Browse files
share results with the caller
1 parent 80903e0 commit 7391df2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/models/wiki/wiki.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,13 @@ def push_repo
170170
output = `cd #{@gollum_wiki.path} && git push #{@upstream} master 2>&1`
171171
if $?.success?
172172
puts "Pushed: #{output}"
173+
return output
173174
else
174175
puts "Unable to push: #{output}"
175176
raise Exception.new("Git push in #{@gollum_wiki.path} failed with status #{$?.exitstatus}: #{output}")
176177
end
178+
else
179+
return "No upstream"
177180
end
178181
end
179182

@@ -183,10 +186,13 @@ def pull_repo
183186
if $?.success?
184187
puts "Pulled: #{output}"
185188
refresh
189+
return output
186190
else
187191
puts "Unable to pull: #{output}"
188192
raise Exception.new("Git pull in #{@gollum_wiki.path} failed with status #{$?.exitstatus}: #{output}")
189193
end
194+
else
195+
return "No upstream"
190196
end
191197
end
192198

0 commit comments

Comments
 (0)