Check that --config and --print are not used together
authorAlexander Popov <alex.popov@linux.com>
Mon, 30 May 2022 21:41:09 +0000 (00:41 +0300)
committerAlexander Popov <alex.popov@linux.com>
Mon, 30 May 2022 22:54:35 +0000 (01:54 +0300)
kconfig_hardened_check/__init__.py

index a2fe794ae623efb1d3f3602a49ff7d8897eac6bb..01ffcbdd0a2cdd18ecd1ee0396d152c175d6c770 100644 (file)
@@ -851,6 +851,9 @@ def main():
     config_checklist = []
 
     if args.config:
+        if args.print:
+            sys.exit('[!] ERROR: --config and --print can\'t be used together')
+
         if mode != 'json':
             print('[+] Kconfig file to check: {}'.format(args.config))
             if args.cmdline: