lib/catfish/cli.rb in catfish-0.0.6 vs lib/catfish/cli.rb in catfish-0.0.7

- old
+ new

@@ -43,11 +43,11 @@ def init require 'catfish/cli/init' Init.new(options.dup, self).run end - desc 'resolve [OPTIONS]', 'Resolves the servers listed in Catfishfile to .lock' + desc 'resolve', 'Resolves the servers listed in Catfishfile to .lock' def resolve require 'catfish/cli/resolve' Resolve.new(options.dup).run end @@ -66,16 +66,15 @@ desc 'provision [OPTIONS]', 'Provision to the servers specified in Catfishfile.lock' method_option 'provider', type: :string, default: 'managed', banner: 'Vagrant provider to use.' method_option 'parallel', type: :boolean, default: false, banner: 'Run provisioning in parallel' def provision exists_before_resolve = File.exist?('Catfishfile.lock') - invoke :resolve - invoke :plugin + resolve + plugin require 'catfish/cli/provision' Provision.new(options.dup).run - # If the Catfishfile.lock existed before the start of the run, then # we should leave it there. Otherwise, we should clean it up. - FileUtils.rm 'Catfishfile.lock', force: true unless exists_before_resolve + clean unless exists_before_resolve end end end