help: print errors to stderr (#6486)

pull/6490/head
Denis 2020-09-28 07:14:34 +03:00 committed by GitHub
parent 0e2f267805
commit 6981f2afeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -15,12 +15,12 @@ pub fn print_and_exit(topic string) {
if (b >= `a` && b <= `z`) || b == `-` || (b >= `0` && b <= `9`) { if (b >= `a` && b <= `z`) || b == `-` || (b >= `0` && b <= `9`) {
continue continue
} }
println(unknown_topic) eprintln(unknown_topic)
exit(1) exit(1)
} }
target_topic := os.join_path(vroot, 'cmd', 'v', 'help', '${topic}.txt') target_topic := os.join_path(vroot, 'cmd', 'v', 'help', '${topic}.txt')
content := os.read_file(target_topic) or { content := os.read_file(target_topic) or {
println(unknown_topic) eprintln(unknown_topic)
exit(1) exit(1)
} }
println(content) println(content)