From b97ea5dc8fec79b9473c6b9fdd53fd332e31b766 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 1 Dec 2014 09:36:38 -0800 Subject: only include monitor ssh key in authorized keys if it actually exists. --- lib/leap_cli/commands/compile.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb index 9308f20..28bf774 100644 --- a/lib/leap_cli/commands/compile.rb +++ b/lib/leap_cli/commands/compile.rb @@ -86,7 +86,9 @@ module LeapCli if keys.empty? bail! "You must have at least one public SSH user key configured in order to proceed. See `leap help add-user`." end - keys << path(:monitor_pub_key) + if file_exists?(path(:monitor_pub_key)) + keys << path(:monitor_pub_key) + end keys.sort.each do |keyfile| ssh_type, ssh_key = File.read(keyfile).strip.split(" ") buffer << ssh_type -- cgit v1.2.3