diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-06-25 20:44:49 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-06-25 20:50:24 +0900 |
| commit | aa454b158f3713b2ee47162837dcea1efdce0ee6 (patch) | |
| tree | 71c9ebf64bf518311fccef1b9c0fc25d59778c26 /internal | |
| parent | 7007bd6a1c022dee1951413b820a54f5b4271bbb (diff) | |
cmd/planterette: remove hsu special case
Remove special case and invoke hakurei out of process.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/path.go | 14 |
1 files changed, 12 insertions, 2 deletions
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) } |
