lib/vagrant-orchestrate/command/push.rb in vagrant-orchestrate-0.7.0 vs lib/vagrant-orchestrate/command/push.rb in vagrant-orchestrate-0.7.1
- old
+ new
@@ -54,11 +54,11 @@
end
argv = parse_options(opts)
return unless argv
- guard_clean unless ENV["VAGRANT_ORCHESTRATE_NO_GUARD_CLEAN"]
+ guard_clean
machines = filter_unmanaged(argv)
return 0 if machines.empty?
@start_time = Time.now
@@ -193,9 +193,11 @@
@env.ui.warn "Vagrant-orchestrate did find any credentials. Continuing with default credentials."
end
end
def guard_clean
+ return if ENV["VAGRANT_ORCHESTRATE_NO_GUARD_CLEAN"] || \
+ @env.vagrantfile.config.orchestrate.disable_commit_guard
message = "ERROR!\nThere are files that need to be committed first."
RepoStatus.clean? && RepoStatus.committed? && !RepoStatus.untracked? || abort(message)
end
end
end