From 6eed387731b2fa9b46bf9b52117b71f287bea23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=BCrrer?= Date: Thu, 12 Sep 2013 20:30:09 +0200 Subject: [PATCH] Make password optional for sftp deployment Some people use public key authentication --- lib/middleman-deploy/commands.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/middleman-deploy/commands.rb b/lib/middleman-deploy/commands.rb index a98f265..6f0c2b7 100644 --- a/lib/middleman-deploy/commands.rb +++ b/lib/middleman-deploy/commands.rb @@ -115,9 +115,13 @@ EOF if (!options.host || !options.path) print_usage_and_die "The rsync deploy method requires host and path to be set." end - when :ftp, :sftp + when :ftp if (!options.host || !options.user || !options.password || !options.path) - print_usage_and_die "The #{options.method} method requires host, user, password, and path to be set." + print_usage_and_die "The ftp deploy method requires host, user, password, and path to be set." + end + when :sftp + if (!options.host || !options.user || !options.path) + print_usage_and_die "The sftp deploy method requires host, user and path to be set." end end