check if plugin directory exists and warn the user

This commit is contained in:
Christian Mehlmauer
2012-09-23 22:55:19 +02:00
parent a15028793e
commit c0c14faad1
2 changed files with 13 additions and 0 deletions

View File

@@ -83,6 +83,15 @@ begin
raise "The wp_content_dir has not been found, please supply it with --wp-content-dir"
end
unless wp_target.wp_plugins_dir_exists?
puts "The plugins directory '#{wp_target.wp_plugins_dir}' does not exist."
puts "You can specify one per command line option (don't forget to include the wp-content directory if needed)"
puts "Continue? [y/n]"
unless Readline.readline =~ /^y/i
exit
end
end
# Output runtime data
start_time = Time.now
puts "| URL: #{wp_target.url}"