Skip to content

Commit 5ad41cc

Browse files
committed
fix: exec output places string in errors now, darwin was checking output still
1 parent fe308e8 commit 5ad41cc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/meshnet/system/firewall/firewall_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func newFirewall(ctx context.Context, opts *Options) (Firewall, error) {
4040
// Enable the packet filter
4141
out, err := common.ExecOutput(context.Background(), "pfctl", "-e")
4242
if err != nil {
43-
if strings.Contains(string(out), "pf already enabled") {
43+
if strings.Contains(err.Error(), "pf already enabled") {
4444
return &pfctlFirewall{
4545
enabledAtStart: true,
4646
anchorFile: afile,

pkg/meshnet/system/firewall/firewall_freebsd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func newFirewall(ctx context.Context, opts *Options) (Firewall, error) {
4040
// Enable the packet filter
4141
out, err := common.ExecOutput(context.Background(), "pfctl", "-e")
4242
if err != nil {
43-
if strings.Contains(string(out), "pf already enabled") {
43+
if strings.Contains(err.Error(), "pf already enabled") {
4444
return &pfctlFirewall{
4545
enabledAtStart: true,
4646
anchorFile: afile,

0 commit comments

Comments
 (0)