lib/command.rb in dev_tasks-1.0.7 vs lib/command.rb in dev_tasks-1.0.8
- old
+ new
@@ -15,10 +15,12 @@
def execute
Logger.start_command self
+ pwd=Dir.pwd
+ Dir.chdir(self[:directory]) if(self.has_key?(:directory) && File.exists?(self[:directory]))
#print " " + Color.green + self[:input] + Color.clear
self[:start_time]=Time.now
timer=Timer.new
if self[:input].include?('<%') && self[:input].include?('%>')
@@ -39,9 +41,10 @@
#else
# puts " " + timer.elapsed_str
#end
end
+ Dir.chdir(pwd) if pwd != Dir.pwd
Logger.end_command self
end
end
\ No newline at end of file