lib/pull.rb in dev_tasks-1.0.11 vs lib/pull.rb in dev_tasks-1.0.12
- old
+ new
@@ -2,10 +2,10 @@
require_relative('./environment.rb')
require 'time'
class Pull < CommandArray
def update
- if(Environment.scm=='git' && Environment.scm_origin.length > 0)
+ if(Environment.scm=='git' && Environment.scm_origin.length > 0 && `git config --list`.include?('user.name='))
if(Timer.elapsed_exceeds?("last_pull",60*60*2))
#if(Timer.get_elapsed("last_pull").nil? || Timer.get_elapsed("last_pull") > 60*60*2)
self.add "<%`git pull 2>&1`%>"
self.add "<%Timer.set_timestamp('last_pull')%>"
end
\ No newline at end of file