gracefully handle saving posts without titles

This commit is contained in:
Sami Samhuri 2015-04-19 16:11:51 -07:00
parent 446f1c85c3
commit 2fb181dbcb

View file

@ -377,7 +377,7 @@ class HarpBlog
def git_commit(action, title, *files)
quoted_files = files.map { |f| "\"#{quote(f)}\"" }
message = "#{action} '#{quote(title)}'"
message = "#{action} '#{quote(title || 'Untitled')}'"
run("git add -A #{quoted_files.join(' ')} && git commit -m \"#{message}\"")
end