TempDirAbsolutePath wraps `os.MkdirTemp`, ensuring symlinks are expanded before returning the path
(dir string, prefix string)
| 31 | // TempDirAbsolutePath wraps `os.MkdirTemp`, ensuring symlinks are expanded |
| 32 | // before returning the path |
| 33 | func TempDirAbsolutePath(dir string, prefix string) string { |
| 34 | tempDir, err := os.MkdirTemp(dir, prefix) |
| 35 | Expect(err).NotTo(HaveOccurred()) |
| 36 | |
| 37 | tempDir, err = filepath.EvalSymlinks(tempDir) |
| 38 | Expect(err).NotTo(HaveOccurred()) |
| 39 | |
| 40 | return tempDir |
| 41 | } |
| 42 | |
| 43 | // TempFileAbsolutePath wraps `os.CreateTemp`, ensuring symlinks are expanded |
| 44 | // before returning the path |
no outgoing calls
no test coverage detected