We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3eb8f7 commit b868adfCopy full SHA for b868adf
constructors.go
@@ -45,7 +45,7 @@ func NullPath() *Path {
45
46
// TempDir returns the default path to use for temporary files
47
func TempDir() *Path {
48
- return New(os.TempDir())
+ return New(os.TempDir()).Canonical()
49
}
50
51
// MkTempDir creates a new temporary directory in the directory
paths_test.go
@@ -204,6 +204,10 @@ func TestReadFileAsLines(t *testing.T) {
204
require.Equal(t, "line 3", lines[3])
205
206
207
+func TestCanonicaTempDir(t *testing.T) {
208
+ require.Equal(t, TempDir().String(), TempDir().Canonical().String())
209
+}
210
+
211
func TestCopyDir(t *testing.T) {
212
tmp, err := MkTempDir("", "")
213
require.NoError(t, err)
0 commit comments