Skip to content

Commit a7512c7

Browse files
authored
Merge pull request #54 from punkymaniac/feature/error-missing-config
Add clean exit if no git user configuration is set
2 parents aef6173 + 7823fb7 commit a7512c7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/docurium.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ def generate_docs
162162
versions = vers
163163
end
164164

165+
if (@repo.config['user.name'].nil? || @repo.config['user.email'].nil?)
166+
puts "ERROR: 'user.name' or 'user.email' is not configured. Docurium will not be able to commit the documentation"
167+
exit(false)
168+
end
169+
165170
process_project(versions) do |i, version, result|
166171
data, examples = result
167172
sha = @repo.write(data.to_json, :blob)

0 commit comments

Comments
 (0)