From aa454b158f3713b2ee47162837dcea1efdce0ee6 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 25 Jun 2025 20:44:49 +0900 Subject: cmd/planterette: remove hsu special case Remove special case and invoke hakurei out of process. Signed-off-by: Ophestra --- internal/path.go | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'internal/path.go') diff --git a/internal/path.go b/internal/path.go index 9a59ac5b..6b7b2200 100644 --- a/internal/path.go +++ b/internal/path.go @@ -8,16 +8,26 @@ import ( ) var ( - hsu = compPoison + hakurei = compPoison + hsu = compPoison ) +func MustHakureiPath() string { + if name, ok := checkPath(hakurei); ok { + return name + } + hlog.BeforeExit() + log.Fatal("invalid hakurei path, this program is compiled incorrectly") + return compPoison // unreachable +} + func MustHsuPath() string { if name, ok := checkPath(hsu); ok { return name } hlog.BeforeExit() log.Fatal("invalid hsu path, this program is compiled incorrectly") - return compPoison + return compPoison // unreachable } func checkPath(p string) (string, bool) { return p, p != compPoison && p != "" && path.IsAbs(p) } -- cgit v1.3.1