lib/fig/command.rb in fig-0.1.71 vs lib/fig/command.rb in fig-0.1.73
- old
+ new
@@ -156,15 +156,23 @@
prepare_repository()
prepare_environment()
end
def set_up_update_lock()
- return if not @options.update_packages
+ return if @options.actions.none? {|action| action.modifies_repository?}
update_lock_response = @options.update_lock_response
return if update_lock_response == :ignore
+ if Fig::OperatingSystem.windows?
+ if ! update_lock_response.nil?
+ Fig::Logging.warn('At present, locking is not supported on Windows.')
+ end
+
+ return
+ end
+
@update_lock = Fig::UpdateLock.new(@options.home, update_lock_response)
# *sigh* Ruby 1.8 doesn't support close_on_exec(), so we've got to ensure
# this stuff on our own.
Fig::AtExit.add { @update_lock.close }
@@ -200,15 +208,10 @@
@application_configuration,
@publish_listeners,
check_include_statements_versions?
)
- case @options.update_packages
- when :unconditionally
- @repository.update_unconditionally
- when :if_missing
- @repository.update_if_missing
- end
+ @options.actions.each {|action| action.prepare_repository(@repository)}
return
end
def prepare_environment()