v.v: fix exit codes and add stderr (#9247)

pull/9249/head
fossdd 2021-03-11 13:52:13 +01:00 committed by GitHub
parent 7d0cba5e96
commit 27cb0d97cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -84,8 +84,8 @@ fn main() {
exit(1) exit(1)
} }
if command == 'test-vet' { if command == 'test-vet' {
println('Please use `v test-cleancode` instead.') eprintln('Please use `v test-cleancode` instead.')
return exit(1)
} }
// Start calling the correct functions/external tools // Start calling the correct functions/external tools
// Note for future contributors: Please add new subcommands in the `match` block below. // Note for future contributors: Please add new subcommands in the `match` block below.
@ -103,8 +103,8 @@ fn main() {
return return
} }
'translate' { 'translate' {
println('Translating C to V will be available in V 0.3') eprintln('Translating C to V will be available in V 0.3')
return exit(1)
} }
'search', 'install', 'update', 'upgrade', 'outdated', 'list', 'remove' { 'search', 'install', 'update', 'upgrade', 'outdated', 'list', 'remove' {
util.launch_tool(prefs.is_verbose, 'vpm', os.args[1..]) 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']) util.launch_tool(prefs.is_verbose, 'vdoc', ['doc', 'vlib'])
} }
'get' { '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) exit(1)
} }
'version' { 'version' {