Skip to content

Commit

Permalink
ci,v.help: work around -autofree bugs, fix ./v -autofree -o v2 cmd/v
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Nov 14, 2024
1 parent d6cfe64 commit 2831b61
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions vlib/v/help/help.v
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@ pub fn print_and_exit(topic string, opts ExitOptions) {
print_known_topics()
exit(fail_code)
}
println(os.read_file(topic_path) or {
eprintln('error: failed reading topic file: ${err}')
topic_content := os.read_file(topic_path) or {
msg := err.str()
eprintln('error: failed reading topic file: ${msg}')
exit(fail_code)
}.trim_space())
}
cleaned := topic_content.trim_space()
println(cleaned)
exit(opts.exit_code)
}

Expand All @@ -76,7 +79,8 @@ fn print_known_topics() {
res << topic
}
}
println('Known help topics: ${res.sorted()}')
sorted_topics := res.sorted()
println('Known help topics: ${sorted_topics}')
}

fn get_vexe() string {
Expand Down

0 comments on commit 2831b61

Please sign in to comment.