diff --git a/scli b/scli index 06ef65d..f917739 100755 --- a/scli +++ b/scli @@ -2861,6 +2861,11 @@ def parse_cfg_file(parser, cli_args): def parse_args(): parser = make_arg_parser() args = parser.parse_args() + + if args.subcommand == 'link': + link_device(args.name) + sys.exit() + if args.config_file: args = parse_cfg_file(parser, args) if args.editor_command is None: @@ -2883,10 +2888,6 @@ def main(): logging.disable() logging.info("scli %s", __version__) - if args.subcommand == 'link': - link_device(args.name) - sys.exit() - if not os.path.exists(SCLI_DATA_FOLDER): try: os.makedirs(SCLI_DATA_FOLDER)