diff --git a/internal/preproc/filereader_test.go b/internal/preproc/filereader_test.go index bd0f472..76c4e60 100644 --- a/internal/preproc/filereader_test.go +++ b/internal/preproc/filereader_test.go @@ -8,10 +8,10 @@ import ( func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) { origPath := os.Getenv("C65LIBPATH") - defer os.Setenv("C65LIBPATH", origPath) + defer func() { _ = os.Setenv("C65LIBPATH", origPath) }() libPath, _ := filepath.Abs("filereader_mocks/lib") - os.Setenv("C65LIBPATH", libPath) + _ = os.Setenv("C65LIBPATH", libPath) // Now create reader reader := NewDiskFileReader() @@ -54,9 +54,9 @@ func TestDiskFileReader_ReadLines_LibraryIncludes(t *testing.T) { func TestDiskFileReader_ReadLines_LibraryWithoutEnv(t *testing.T) { origPath := os.Getenv("C65LIBPATH") - defer os.Setenv("C65LIBPATH", origPath) + defer func() { _ = os.Setenv("C65LIBPATH", origPath) }() - os.Setenv("C65LIBPATH", "") + _ = os.Setenv("C65LIBPATH", "") // Now create reader reader := NewDiskFileReader()