aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/compile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands/compile.rb')
-rw-r--r--lib/leap_cli/commands/compile.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb
index eaedfbf..13fa9ac 100644
--- a/lib/leap_cli/commands/compile.rb
+++ b/lib/leap_cli/commands/compile.rb
@@ -9,10 +9,13 @@ module LeapCli
c.command :all do |all|
all.action do |global_options,options,args|
environment = args.first
+ if !LeapCli.leapfile.environment.nil? && environment != LeapCli.leapfile.environment
+ bail! "You cannot specify an ENVIRONMENT argument while the environment is pinned."
+ end
if environment && manager.environment_names.include?(environment)
- compile_hiera_files(manager.filter(args))
+ compile_hiera_files(manager.filter([environment]))
else
- compile_hiera_files
+ compile_hiera_files(manager.filter)
end
end
end