Skip to content

Commit 19f5813

Browse files
authored
Merge pull request #242 from AXGKl/develop
Respecting XDG vars correctly
2 parents be730af + 9ea9473 commit 19f5813

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,13 +555,16 @@ Two other environment variables exist:
555555

556556
## Removing binenv stuff
557557

558-
`binenv` stores downloaded binaries in `~/.binenv/binaries`, and a cache in
559-
`~/.config/binenv/` (or whatever your `XDG_CONFIG` variable points to).
558+
`binenv` stores
559+
560+
- downloaded binaries by default in `~/.binenv/binaries`
561+
- the versions cache in `~/.cache/binenv/` (or wherever your `XDG_CACHE_HOME` variable points to)
562+
- the list of known distributions in `~/.config/binenv/` (or wherever your `XDG_CONFIG_HOME` variable points to).
560563

561564
To wipe everything clean:
562565

563566
```bash
564-
rm -rfi ~/.binenv ~/.config/binenv/
567+
rm -rfi ~/.binenv ~/.config/binenv ~/.cache/binenv
565568
```
566569

567570
Don't forget to remove the `PATH` and the completion you might have changed in

internal/app/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ func GetDefaultConfDir() (string, error) {
3535
if err != nil {
3636
return "", err
3737
}
38-
d += "/.config/binenv"
38+
d += "/.config"
3939
}
4040

41-
return d, nil
41+
return d + "/binenv", nil
4242
}
4343

4444
// GetDefaultCacheDir returns the cache directory in usermode
@@ -51,10 +51,10 @@ func GetDefaultCacheDir() (string, error) {
5151
if err != nil {
5252
return "", err
5353
}
54-
d += "/.cache/binenv"
54+
d += "/.cache"
5555
}
5656

57-
return d, nil
57+
return d + "/binenv", nil
5858
}
5959

6060
func stringInSlice(st string, sl []string) bool {

0 commit comments

Comments
 (0)