From 2fb181dbcb671e382c7b678c3fd62c81b2385711 Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sun, 19 Apr 2015 16:11:51 -0700 Subject: [PATCH] gracefully handle saving posts without titles --- server/harp_blog.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/harp_blog.rb b/server/harp_blog.rb index 13b8281..4ad0e88 100644 --- a/server/harp_blog.rb +++ b/server/harp_blog.rb @@ -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