From 7ad6fae109aed39d5decb73640ed409160a9eed9 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 1 Dec 2014 12:32:51 -0800 Subject: don't mess up secrets.json when env is pinned --- lib/leap_cli/commands/compile.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb index 28bf774..67d1bb6 100644 --- a/lib/leap_cli/commands/compile.rb +++ b/lib/leap_cli/commands/compile.rb @@ -38,7 +38,10 @@ module LeapCli # export generated files manager.export_nodes(nodes) - manager.export_secrets(nodes.nil?) # only do a "clean" export if we are examining all the nodes + # a "clean" export of secrets will also remove keys that are no longer used, + # but this should not be done if we are not examining all possible nodes. + clean_export = LeapCli.leapfile.environment.nil? && nodes.nil? + manager.export_secrets(clean_export) end def update_compiled_ssh_configs -- cgit v1.2.3