forked from security/hakurei
internal/app: filter ops in implementation
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:
@@ -25,6 +25,10 @@ type spX11Op struct {
|
||||
}
|
||||
|
||||
func (s *spX11Op) toSystem(state *outcomeStateSys) error {
|
||||
if state.config.Enablements.Unwrap()&hst.EX11 == 0 {
|
||||
return errNotEnabled
|
||||
}
|
||||
|
||||
if d, ok := state.k.lookupEnv("DISPLAY"); !ok {
|
||||
return newWithMessage("DISPLAY is not set")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user