1
0
forked from rosa/hakurei

cmd/mbf: default daemon socket in cache

This location makes more sense than the current directory.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-04-19 19:49:52 +09:00
parent a4a54a4a4d
commit 021cbbc2a8
2 changed files with 4 additions and 4 deletions

View File

@@ -31,9 +31,6 @@ func (cache *cache) open() (err error) {
return os.ErrInvalid
}
if cache.base == "" {
cache.base = "cache"
}
var base *check.Absolute
if cache.base, err = filepath.Abs(cache.base); err != nil {
return

View File

@@ -70,11 +70,14 @@ func main() {
msg.SwapVerbose(!flagQuiet)
cm.ctx, cm.msg = ctx, msg
cm.base = os.ExpandEnv(cm.base)
if cm.base == "" {
cm.base = "cache"
}
addr.Net = "unix"
addr.Name = os.ExpandEnv(addr.Name)
if addr.Name == "" {
addr.Name = "daemon"
addr.Name = filepath.Join(cm.base, "daemon")
}
return nil