one more shot

This commit is contained in:
Sami Samhuri 2015-04-25 00:28:19 -07:00
parent 0a68892774
commit 7aa42fdbf8

View file

@ -374,8 +374,10 @@ class HarpBlog
def run(cmd, safety = :destructive)
if safety == :destructive && @dry_run
puts ">>> cd '#{@path}' && #{cmd}"
true
else
`cd '#{@path}' && #{cmd} 2>&1`
$?.success?
end
end
@ -404,7 +406,9 @@ class HarpBlog
end
def git_update(remote = 'origin')
run "git update #{remote} && rm #{origin_updated_path}"
if run "git update #{remote}", :nondestructive
File.unlink origin_updated_path
end
end
def origin_updated?