MCPcopy
hub / github.com/docker/compose / tearDown

Method tearDown

pkg/watch/temp_dir_fixture.go:182–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180}
181
182func (f *TempDirFixture) tearDown() {
183 if f.oldDir != "" {
184 err := os.Chdir(f.oldDir)
185 if err != nil {
186 f.t.Fatal(err)
187 }
188 }
189
190 err := f.dir.TearDown()
191 if err != nil && runtime.GOOS == "windows" &&
192 (strings.Contains(err.Error(), "The process cannot access the file") ||
193 strings.Contains(err.Error(), "Access is denied")) {
194 // NOTE(nick): I'm not convinced that this is a real problem.
195 // I think it might just be clean up of file notification I/O.
196 } else if err != nil {
197 f.t.Fatal(err)
198 }
199}

Callers

nothing calls this directly

Calls 3

ChdirMethod · 0.80
TearDownMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected