gomonkey: panic: permission denied [recovered] macOS 12 apple m1 pro
` === RUN Test_Trigger — FAIL: Test_Trigger (0.34s) panic: permission denied [recovered] panic: permission denied
goroutine 117 [running]: testing.tRunner.func1.2(0x101d08920, 0x102a6bc88) /Users/tango/sdk/go1.16.13/src/testing/testing.go:1143 +0x25c testing.tRunner.func1(0x1400060e480) /Users/tango/sdk/go1.16.13/src/testing/testing.go:1146 +0x384 panic(0x101d08920, 0x102a6bc88) /Users/tango/sdk/go1.16.13/src/runtime/panic.go:965 +0x14c github.com/agiledragon/gomonkey/v2.modifyBinary(0x10155ca90, 0x14000f22198, 0x18, 0x18) /Users/tango/go/pkg/mod/github.com/agiledragon/gomonkey/v2@v2.4.0/modify_binary_darwin.go:9 +0xec github.com/agiledragon/gomonkey/v2.replace(0x10155ca90, 0x14001e79960, 0x14001f58ed0, 0x14001f59a90, 0x101be0500) /Users/tango/go/pkg/mod/github.com/agiledragon/gomonkey/v2@v2.4.0/patch.go:196 +0xb8 github.com/agiledragon/gomonkey/v2.(*Patches).ApplyCore(0x14001f59008, 0x101be05a0, 0x101f0e150, 0x13, 0x101be05a0, 0x14001e79960, 0x13, 0x1016cd448) /Users/tango/go/pkg/mod/github.com/agiledragon/gomonkey/v2@v2.4.0/patch.go:158 +0x104 github.com/agiledragon/gomonkey/v2.(*Patches).ApplyFunc(0x14001f59008, 0x101be05a0, 0x101f0e150, 0x101be05a0, 0x14001e79960, 0x4) /Users/tango/go/pkg/mod/github.com/agiledragon/gomonkey/v2@v2.4.0/patch.go:66 +0x138 github.com/agiledragon/gomonkey/v2.ApplyFunc(…) /Users/tango/go/pkg/mod/github.com/agiledragon/gomonkey/v2@v2.4.0/patch.go:24 git.code.oa.com/fabriceli/drules/service/cmd/ruleshub.initMock(0x14000024eb8, 0x10089b3a4) /Users/tango/Code/GolandProjects/drules/service/cmd/ruleshub/main_test.go:62 +0x224 /Users/tango/Code/GolandProjects/drules/service/cmd/ruleshub/main_test.go:35 +0x9c testing.tRunner(0x1400060e480, 0x101f0e100) /Users/tango/sdk/go1.16.13/src/testing/testing.go:1193 +0xd8 created by testing.(*T).Run /Users/tango/sdk/go1.16.13/src/testing/testing.go:1238 +0x21c
Process finished with the exit code 1 `
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 8
- Comments: 23 (4 by maintainers)
export GOARCH=amd64
升级到v2.9.0还是出现同样的问题, export GOARCH=amd64 也不起作用,什么时候能修复这个问题
Please try to this method: #70 arm64 MacOS can use amd64 version go, I change to go1.16.11 darwin/amd64,and https://github.com/eisenxp/macos-golink-wrapper
v2.11.0 has been released!