Skip to content

Commit dc22b4a

Browse files
install vscode and exit
1 parent bcbd55d commit dc22b4a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

codeflash/cli_cmds/cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ def parse_args() -> Namespace:
2121
init_parser = subparsers.add_parser("init", help="Initialize Codeflash for a Python project.")
2222
init_parser.set_defaults(func=init_codeflash)
2323

24-
install_vscode_parser = subparsers.add_parser("vscode-install", help="Install the Codeflash VSCode extension")
25-
install_vscode_parser.set_defaults(func=install_vscode_extension)
24+
subparsers.add_parser("vscode-install", help="Install the Codeflash VSCode extension")
2625

2726
init_actions_parser = subparsers.add_parser("init-actions", help="Initialize GitHub Actions workflow")
2827
init_actions_parser.set_defaults(func=install_github_actions)
@@ -118,9 +117,15 @@ def process_and_validate_cmd_args(args: Namespace) -> Namespace:
118117
logging_config.set_level(logging.DEBUG, echo_setting=not is_init)
119118
else:
120119
logging_config.set_level(logging.INFO, echo_setting=not is_init)
120+
121121
if args.version:
122122
logger.info(f"Codeflash version {version}")
123123
sys.exit()
124+
125+
if args.command == "vscode-install":
126+
install_vscode_extension()
127+
sys.exit()
128+
124129
if not check_running_in_git_repo(module_root=args.module_root):
125130
if not confirm_proceeding_with_no_git_repo():
126131
exit_with_message("No git repository detected and user aborted run. Exiting...", error_on_exit=True)

0 commit comments

Comments
 (0)