Skip to content

Commit 0ebb8f2

Browse files
feat: promote ~/.vagrant.d/boxes to a built-in fixed directory (#121)
* feat: promote ~/.vagrant.d/boxes to a built-in fixed directory * docs(readme): list ~/.vagrant.d/boxes in the built-in global caches table The supported-ecosystems table names every built-in fixed dir, so the new Vagrant boxes entry belongs there too. --------- Co-authored-by: django23 <827397+django23@users.noreply.github.com>
1 parent 81b5027 commit 0ebb8f2

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
88

99
### Added
1010

11+
- Vagrant boxes (`~/.vagrant.d/boxes`) is now one of the built-in global caches, excluded
12+
when you opt in with `[fixed_dirs] enabled = true`
13+
([#117](https://github.com/AsimovMac/asimov/issues/117)).
14+
1115
- `[skip_paths]` config section: name directories that Asimov should never search, alongside the built-in `~/.Trash` and `~/Library`. Thanks [@lunaluxie](https://github.com/lunaluxie)!
1216

1317
- `asimov doctor` now checks the data files and reports how many sentinels and fixed directories are loaded, so an incomplete install is diagnosed rather than just failing.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ This means Asimov never touches a folder that just happens to share a common nam
9898
| **R** | `renv` |
9999
| **DevOps / IaC** | `.terraform`, `.terragrunt-cache`, `.vagrant`, `.direnv`, `cdk.out` |
100100
| **Game dev** | `.godot` |
101-
| **Global caches** (opt-in) | `~/.cache`, `~/.gradle/caches`, `~/.m2/repository`, `~/.npm/_cacache`, `~/.nuget/packages`, `~/.kube/cache`, `~/go/pkg/mod` |
101+
| **Global caches** (opt-in) | `~/.cache`, `~/.gradle/caches`, `~/.m2/repository`, `~/.npm/_cacache`, `~/.nuget/packages`, `~/.kube/cache`, `~/go/pkg/mod`, `~/.vagrant.d/boxes` |
102102

103103
**Don't see your tool?** You can teach Asimov your own directory + sentinel pairs in a couple of lines — no need to wait for a release. See [Add your own patterns](#add-your-own-patterns).
104104

data/fixed-dirs.tsv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
.m2/repository maven local repository
2020
.npm/_cacache npm content-addressable cache
2121
.nuget/packages nuget global packages
22+
.vagrant.d/boxes vagrant base box images
2223
go/pkg/mod go module cache (0555 inside; exclude as a whole)

tests/behavior.bats

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,14 @@ enabled = true"
295295
refute_excluded "${HOME}/go/pkg/mod/github.com/foo/bar@v1.2.3/vendor"
296296
}
297297

298+
@test "excludes the Vagrant boxes directory when fixed dirs are enabled" {
299+
mkdir -p "${HOME}/.vagrant.d/boxes"
300+
write_config "[fixed_dirs]
301+
enabled = true"
302+
run_asimov
303+
assert_excluded "${HOME}/.vagrant.d/boxes"
304+
}
305+
298306
@test "does not re-exclude already excluded fixed directory" {
299307
mkdir -p "${HOME}/.cache"
300308
write_config "[fixed_dirs]

0 commit comments

Comments
 (0)