Adding case insensitive match for netsh output

`isSuccess` originally matched on `OK` without checking the case of the output. Some windows builds output `Ok` as well.
This commit is contained in:
Jacob Reynolds 2018-02-28 13:33:30 -06:00 committed by GitHub
commit 5c991a58e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,7 +36,7 @@ func (f WindowsFirewall) IsForwardingEnabled() bool {
}
func (f WindowsFirewall) isSuccess(output string) bool {
if trimmed := core.Trim(output); trimmed == "" || strings.Contains(trimmed, "OK") == true {
if trimmed := core.Trim(strings.ToLower(output)); trimmed == "" || strings.Contains(trimmed, "ok") == true {
return true
} else {
return false