Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion internal/installation/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ func CachePath() string {
return path
}

return filepath.Join(BaseCachePath(), relativeCachePath())
cachePath = filepath.Join(BaseCachePath(), relativeCachePath())
if runtime.GOOS == "windows" {
// Explicitly append "cache" dir as the cachedir on Windows.
// It is the same as the local appdata dir (conflicts with config)
cachePath = filepath.Join(cachePath, "cache")
}
return cachePath
}

func GlobalBinDir() string {
Expand Down
2 changes: 1 addition & 1 deletion internal/installation/storage/storage_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ func BaseCachePath() string {
return cache
}

return filepath.Join(homeDir, "AppData", "Local", "cache")
return filepath.Join(homeDir, "AppData", "Local")
}
4 changes: 2 additions & 2 deletions test/integration/use_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ func (suite *UseIntegrationTestSuite) TestReset() {

cfg, err := config.New()
suite.NoError(err)
rcfile, err := subshell.New(cfg).RcFile()
suite.NoError(err)
Comment on lines +129 to +130
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There has been a compile error on the v48 branch all this time. I'm finally fixing it here.

if runtime.GOOS != "windows" {
rcfile, err := subshell.New(cfg).RcFile()
fileutils.FileExists(rcfile)
suite.NoError(err)
suite.Contains(string(fileutils.ReadFileUnsafe(rcfile)), ts.Dirs.DefaultBin, "PATH does not have your project in it")
}

Expand Down
Loading