mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +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
|
||||
|
||||
begin
|
||||
# Handle help commands
|
||||
# This allows you to use any of the normal help commands after the normal args.
|
||||
#=====================================================================#
|
||||
# Pre-Flight Code
|
||||
#=====================================================================#
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# 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 & ARGV).each do |cmd|
|
||||
# move the help argument to one place behind the end for Thor to digest
|
||||
|
@ -385,6 +396,11 @@ begin
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# Plugin Loading
|
||||
#---------------------------------------------------------------------#
|
||||
begin
|
||||
# Load v2 plugins. Manually check for plugin disablement.
|
||||
omit_core = ARGV.delete('--disable-core-plugins')
|
||||
omit_user = ARGV.delete('--disable-user-plugins')
|
||||
|
|
Loading…
Reference in a new issue