From 27cb0d97cc1d5e494f949d51e713d0824f415bbf Mon Sep 17 00:00:00 2001 From: fossdd Date: Thu, 11 Mar 2021 13:52:13 +0100 Subject: [PATCH] v.v: fix exit codes and add stderr (#9247) --- cmd/v/v.v | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/v/v.v b/cmd/v/v.v index 8cac0e7774..ebd648b64c 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -84,8 +84,8 @@ fn main() { exit(1) } if command == 'test-vet' { - println('Please use `v test-cleancode` instead.') - return + eprintln('Please use `v test-cleancode` instead.') + exit(1) } // Start calling the correct functions/external tools // Note for future contributors: Please add new subcommands in the `match` block below. @@ -103,8 +103,8 @@ fn main() { return } 'translate' { - println('Translating C to V will be available in V 0.3') - return + eprintln('Translating C to V will be available in V 0.3') + exit(1) } 'search', 'install', 'update', 'upgrade', 'outdated', 'list', 'remove' { util.launch_tool(prefs.is_verbose, 'vpm', os.args[1..]) @@ -114,7 +114,7 @@ fn main() { util.launch_tool(prefs.is_verbose, 'vdoc', ['doc', 'vlib']) } 'get' { - println('V Error: Use `v install` to install modules from vpm.vlang.io') + eprintln('V Error: Use `v install` to install modules from vpm.vlang.io') exit(1) } 'version' {