diff options
author | elijah <elijah@riseup.net> | 2014-10-02 09:07:25 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-10-02 09:07:25 -0700 |
commit | bbda12a4158a445fc7495911b2f5f01e5f139406 (patch) | |
tree | c79bdb224959e316ce963fa50c8cc314006aaf48 | |
parent | a5503a1bdd7668cbd6ee5bd191f9c82d65184030 (diff) | |
download | leap_cli-bbda12a4158a445fc7495911b2f5f01e5f139406.tar.gz leap_cli-bbda12a4158a445fc7495911b2f5f01e5f139406.tar.bz2 |
bugfix: don't overwrite facts if environment is pinned. closes #6169
-rw-r--r-- | lib/leap_cli/commands/facts.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/facts.rb b/lib/leap_cli/commands/facts.rb index d607086..65eda61 100644 --- a/lib/leap_cli/commands/facts.rb +++ b/lib/leap_cli/commands/facts.rb @@ -91,7 +91,9 @@ module LeapCli; module Commands end end end - overwrite_existing = args.empty? + # only overwrite the entire facts file if and only if we are gathering facts + # for all nodes in all environments. + overwrite_existing = args.empty? && LeapCli.leapfile.environment.nil? update_facts_file(new_facts, overwrite_existing) end |