diff --git a/cli/options_test.go b/cli/options_test.go index d8a0bac5..2859d9da 100644 --- a/cli/options_test.go +++ b/cli/options_test.go @@ -251,8 +251,7 @@ func TestWithSeparator(t *testing.T) { }) t.Run("With compatibility separator", func(t *testing.T) { - os.Setenv("COMPOSE_COMPATIBILITY", "true") //nolint:errcheck - defer os.Unsetenv("COMPOSE_COMPATIBILITY") //nolint:errcheck + t.Setenv("COMPOSE_COMPATIBILITY", "true") opts, err := NewProjectOptions([]string{ "testdata/simple/compose-with-network-and-volume.yaml", }, WithName("my-project"), WithOsEnv)