From 9b3ac7efa45f3d3c6bc5a0c0b6eb3090fab6a738 Mon Sep 17 00:00:00 2001 From: S-YOU Date: Mon, 20 Jan 2020 14:16:04 +0900 Subject: [PATCH] v cmd: no need to panic in case of an unknown command --- v.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v.v b/v.v index 8eb7296316..f01330c807 100644 --- a/v.v +++ b/v.v @@ -114,7 +114,7 @@ fn v_command(command string, args []string) { compiler.create_symlink() } 'runrepl' { - //TODO: remove this after 2020/02/01 + // TODO: remove this after 2020/02/01 eprintln('`v runrepl` has been deprecated. Please use `v repl` instead.') compiler.launch_tool('vrepl', 'runrepl') } @@ -132,7 +132,8 @@ fn v_command(command string, args []string) { // v.gen_doc_html_for_module(args.last()) } else { - panic('v $command: unknown command\nRun "v help" for usage.') + eprintln('v $command: unknown command\nRun "v help" for usage.') + exit(1) } } exit(0)