mirror of
https://github.com/taigrr/systemctl.git
synced 2026-04-01 18:18:45 -07:00
add masked check to isEnabled boolean
This commit is contained in:
@@ -51,7 +51,10 @@ func IsEnabled(ctx context.Context, unit string, opts Options) (bool, error) {
|
|||||||
return true, nil
|
return true, nil
|
||||||
} else if matched, _ := regexp.MatchString(`disabled`, stdout); matched {
|
} else if matched, _ := regexp.MatchString(`disabled`, stdout); matched {
|
||||||
return false, nil
|
return false, nil
|
||||||
|
} else if matched, _ := regexp.MatchString(`masked`, stdout); matched {
|
||||||
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return false, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user