Skip to content

Commit

Permalink
v.help: use os.executable() instead of @vexe as an anchor, so `v help…
Browse files Browse the repository at this point in the history
…` will work more robustly.

With that change, `v help` will always work, even right after a V archive is downloaded,
and extracted in an arbitrary folder on another machine, without needing `v self` first.
  • Loading branch information
spytheman committed Sep 12, 2023
1 parent a0490f2 commit 0e2dc38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/help/help.v
Expand Up @@ -8,7 +8,7 @@ const (

// print_and_exit Prints the help topic and exits
pub fn print_and_exit(topic string) {
vexe := @VEXE
vexe := os.executable()
vroot := os.dir(vexe)
topicdir := os.join_path(vroot, 'vlib', 'v', 'help')

Expand Down

0 comments on commit 0e2dc38

Please sign in to comment.