mirror of
https://github.com/inspec/inspec
synced 2025-02-16 22:18:38 +00:00
Add basic integration for the acceptance lib
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
e87b71d2f1
commit
e3c9c019e3
1 changed files with 19 additions and 3 deletions
|
@ -373,9 +373,20 @@ class Inspec::InspecCLI < Inspec::BaseCLI
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
#=====================================================================#
|
||||||
# Handle help commands
|
# Pre-Flight Code
|
||||||
# This allows you to use any of the normal help commands after the normal args.
|
#=====================================================================#
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
# EULA acceptance
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
require 'license-acceptance/acceptor'
|
||||||
|
LicenseAcceptance::Acceptor.check_and_persist('inspec', Inspec::VERSION)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
# Adjustments for help handling
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
# This allows you to use any of the normal help commands after the normal args.
|
||||||
help_commands = ['-h', '--help', 'help']
|
help_commands = ['-h', '--help', 'help']
|
||||||
(help_commands & ARGV).each do |cmd|
|
(help_commands & ARGV).each do |cmd|
|
||||||
# move the help argument to one place behind the end for Thor to digest
|
# move the help argument to one place behind the end for Thor to digest
|
||||||
|
@ -385,6 +396,11 @@ begin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
# Plugin Loading
|
||||||
|
#---------------------------------------------------------------------#
|
||||||
|
begin
|
||||||
# Load v2 plugins. Manually check for plugin disablement.
|
# Load v2 plugins. Manually check for plugin disablement.
|
||||||
omit_core = ARGV.delete('--disable-core-plugins')
|
omit_core = ARGV.delete('--disable-core-plugins')
|
||||||
omit_user = ARGV.delete('--disable-user-plugins')
|
omit_user = ARGV.delete('--disable-user-plugins')
|
||||||
|
|
Loading…
Add table
Reference in a new issue