summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-12-01 09:36:38 -0800
committerelijah <elijah@riseup.net>2014-12-01 09:36:38 -0800
commitb97ea5dc8fec79b9473c6b9fdd53fd332e31b766 (patch)
treec45ac98665194b722eeb77727957ee7f2c72cecb /lib
parent9111037ff59e8ddb29ced270ad0821c0c0b1e036 (diff)
only include monitor ssh key in authorized keys if it actually exists.
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/commands/compile.rb4
1 files changed, 3 insertions, 1 deletions
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