Commit 49e64ff
committed
Revert "guard" in Tr function
otherwise the unit-tests will fail:
=== RUN TestBoardOptions
--- FAIL: TestBoardOptions (0.00s)
panic: i18n.Tr called before i18n.Init() [recovered]
panic: i18n.Tr called before i18n.Init()
goroutine 9 [running]:
testing.tRunner.func1.2(0xc56e00, 0xeaee20)
/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1143 +0x332
testing.tRunner.func1(0xc0002a2f00)
/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1146 +0x4b6
panic(0xc56e00, 0xeaee20)
/opt/hostedtoolcache/go/1.16.7/x64/src/runtime/panic.go:965 +0x1b9
github.com/arduino/arduino-cli/i18n.Tr(0xdceacd, 0x28, 0x0, 0x0, 0x0, 0x0, 0x1)
/home/runner/work/arduino-cli/arduino-cli/i18n/i18n.go:54 +0xd9
github.com/arduino/arduino-cli/arduino/cores.(*Board).GetBuildProperties(0x13bf060, 0xc0003b6150, 0xc000339400, 0x0, 0x0)
/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board.go:109 +0x69d
github.com/arduino/arduino-cli/arduino/cores.(*Board).GeneratePropertiesForConfiguration(0x13bf060, 0xdb5f54, 0xe, 0xc000309ef0, 0xc911e0, 0xc0003b6000)
/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board.go:141 +0x28f
github.com/arduino/arduino-cli/arduino/cores.TestBoardOptions(0xc0002a2f00)
/home/runner/work/arduino-cli/arduino-cli/arduino/cores/board_test.go:298 +0x4bd
testing.tRunner(0xc0002a2f00, 0xe052a8)
/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1193 +0xef
created by testing.(*T).Run
/opt/hostedtoolcache/go/1.16.7/x64/src/testing/testing.go:1238 +0x2b3
FAIL github.com/arduino/arduino-cli/arduino/cores 0.021s
=== RUN TestIndexParsing
--- FAIL: TestIndexParsing (0.00s)
panic: i18n.Tr called before i18n.Init() [recovered]
panic: i18n.Tr called before i18n.Init()1 parent 84842ed commit 49e64ff
1 file changed
+0
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | 23 | | |
28 | 24 | | |
29 | 25 | | |
| |||
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 49 | | |
57 | 50 | | |
0 commit comments