aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-08-25 14:48:27 +0900
committerOphestra <cat@gensokyo.uk>2026-08-25 14:53:29 +0900
commit1c3761bb53c95d75751f95e8f77d9d1e5928b968 (patch)
tree180e272979b83f68e4c32b4f83cd242715a84a72 /internal/pkg/pkg_test.go
parentac7abbbe3fa2eea01defb670abc7dc1dc336cf21 (diff)
container: enter init path early
There is generally no use case where any setup is required before init, and requiring the explicit function call is error-prone and unnecessary. It also causes trouble with packages using a similar trick. This change moves argv0 check early and makes it an import side effect. The stub will be removed in v0.5. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/pkg_test.go')
-rw-r--r--internal/pkg/pkg_test.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go
index 39218d96..b23948f8 100644
--- a/internal/pkg/pkg_test.go
+++ b/internal/pkg/pkg_test.go
@@ -85,8 +85,6 @@ func newRContext(tb testing.TB, c *pkg.Cache) *pkg.RContext {
return &r
}
-func TestMain(m *testing.M) { container.TryArgv0(nil); os.Exit(m.Run()) }
-
// overrideIdent overrides the ID method of [Artifact].
type overrideIdent struct {
id pkg.ID