diff options
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) } |
