(self)
| 654 | return parser |
| 655 | |
| 656 | def _parse_args(self) -> Arguments: |
| 657 | argparse_args = vars(self._parser.parse_args()) |
| 658 | args: Arguments = Arguments(**argparse_args) |
| 659 | |
| 660 | # amend the parameters (check internal consistency) |
| 661 | # Installation can't be silent if config is not passed |
| 662 | if args.config is None and args.config_url is None: |
| 663 | args.silent = False |
| 664 | |
| 665 | if args.debug: |
| 666 | warn(f'Warning: --debug mode will write certain credentials to {logger.path}!') |
| 667 | |
| 668 | if args.plugin: |
| 669 | load_plugin(args.plugin) |
| 670 | |
| 671 | if args.plugin_url: |
| 672 | plugin_data = self._fetch_from_url(args.plugin_url) |
| 673 | plugin_path = self._write_plugin_to_temp_file(plugin_data) |
| 674 | load_plugin(plugin_path) |
| 675 | |
| 676 | if args.creds_decryption_key is None: |
| 677 | if os.environ.get('ARCHINSTALL_CREDS_DECRYPTION_KEY'): |
| 678 | args.creds_decryption_key = os.environ.get('ARCHINSTALL_CREDS_DECRYPTION_KEY') |
| 679 | |
| 680 | return args |
| 681 | |
| 682 | def _parse_config(self) -> dict[str, Any]: |
| 683 | config: dict[str, Any] = {} |
no test coverage detected