Skip to content

Commit

Permalink
fix: exec output places string in errors now, darwin was checking out…
Browse files Browse the repository at this point in the history
…put still
  • Loading branch information
tinyzimmer committed Nov 7, 2023
1 parent fe308e8 commit 5ad41cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/meshnet/system/firewall/firewall_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func newFirewall(ctx context.Context, opts *Options) (Firewall, error) {
// Enable the packet filter
out, err := common.ExecOutput(context.Background(), "pfctl", "-e")
if err != nil {
if strings.Contains(string(out), "pf already enabled") {
if strings.Contains(err.Error(), "pf already enabled") {
return &pfctlFirewall{
enabledAtStart: true,
anchorFile: afile,
Expand Down
2 changes: 1 addition & 1 deletion pkg/meshnet/system/firewall/firewall_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func newFirewall(ctx context.Context, opts *Options) (Firewall, error) {
// Enable the packet filter
out, err := common.ExecOutput(context.Background(), "pfctl", "-e")
if err != nil {
if strings.Contains(string(out), "pf already enabled") {
if strings.Contains(err.Error(), "pf already enabled") {
return &pfctlFirewall{
enabledAtStart: true,
anchorFile: afile,
Expand Down

0 comments on commit 5ad41cc

Please sign in to comment.