summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/compile.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-12-01 12:32:51 -0800
committerelijah <elijah@riseup.net>2014-12-01 12:32:51 -0800
commit7ad6fae109aed39d5decb73640ed409160a9eed9 (patch)
treeedb410a7779f32c6365714c8e6e404e0b4792fd6 /lib/leap_cli/commands/compile.rb
parent3b4bb4dbdb70b6b7931a8118abfceca17b31a3cd (diff)
don't mess up secrets.json when env is pinned
Diffstat (limited to 'lib/leap_cli/commands/compile.rb')
-rw-r--r--lib/leap_cli/commands/compile.rb5
1 files changed, 4 insertions, 1 deletions
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