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 f85d686 commit bbb420dCopy full SHA for bbb420d
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
@@ -208,6 +208,10 @@ func TestReadFileAsLines(t *testing.T) {
208
require.Equal(t, "line 3", lines[3])
209
210
211
+func TestCanonicaTempDir(t *testing.T) {
212
+ require.Equal(t, TempDir().String(), TempDir().Canonical().String())
213
+}
214
+
215
func TestCopyDir(t *testing.T) {
216
tmp, err := MkTempDir("", "")
217
require.NoError(t, err)
0 commit comments