From 0e2dc381ab74f2e74996507b930e93b876517a95 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 12 Sep 2023 23:09:53 +0300 Subject: [PATCH] v.help: use os.executable() instead of @VEXE as an anchor, so `v help` 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. --- vlib/v/help/help.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/help/help.v b/vlib/v/help/help.v index aa0ab15fa70d3b..c86b94381fd9b1 100644 --- a/vlib/v/help/help.v +++ b/vlib/v/help/help.v @@ -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')