internal/app: filter ops in implementation
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m33s
All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 2m18s
Test / Hpkg (push) Successful in 4m1s
Test / Sandbox (race detector) (push) Successful in 4m28s
Test / Hakurei (race detector) (push) Successful in 5m19s
Test / Hakurei (push) Successful in 2m14s
Test / Flake checks (push) Successful in 1m33s
This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/gob"
|
||||
|
||||
"hakurei.app/container/fhs"
|
||||
"hakurei.app/hst"
|
||||
"hakurei.app/system/acl"
|
||||
"hakurei.app/system/dbus"
|
||||
)
|
||||
@@ -18,6 +19,10 @@ type spDBusOp struct {
|
||||
}
|
||||
|
||||
func (s *spDBusOp) toSystem(state *outcomeStateSys) error {
|
||||
if state.config.Enablements.Unwrap()&hst.EDBus == 0 {
|
||||
return errNotEnabled
|
||||
}
|
||||
|
||||
if state.config.SessionBus == nil {
|
||||
state.config.SessionBus = dbus.NewConfig(state.config.ID, true, true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user