Skip to content

Commit

Permalink
fix removes (#175)
Browse files Browse the repository at this point in the history
related to
-
https://github.com/amtoine/nu-git-manager/actions/runs/7684621264/job/20942567622

## description
not sure why this did not fail before but it does now on the latest
`main` of Nushell 🤔

## changelog
- the first commit is here to show the CI failing (well it did not run
at all, lol, but it fails on locally by using a _nightly_ build and the
latest revision of Nupm)
- the rest should fix the CI and the tests
  • Loading branch information
amtoine authored Jan 28, 2024
1 parent 1f7879f commit 7f16d91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pkgs/nu-git-manager/nu-git-manager/fs/cache.nu
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export def remove-from-cache [cache_file: path, old_path: path]: nothing -> noth
# same place as the expected cache file
# - create the parent directory of the cache file
export def clean-cache-dir [cache_file: path]: nothing -> nothing {
rm --recursive --force $cache_file
if ($cache_file | path exists) {
rm --recursive --force $cache_file
}
mkdir ($cache_file | path dirname)
}
4 changes: 3 additions & 1 deletion pkgs/nu-git-manager/tests/gm.nu
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def run-with-env [code: closure, --prepare-cache] {

with-env $TEST_ENV $code

rm --recursive --force --verbose $TEST_ENV_BASE
if ($TEST_ENV_BASE | path exists) {
rm --recursive --force --verbose $TEST_ENV_BASE
}
}

export def error-with-empty-store [] {
Expand Down

0 comments on commit 7f16d91

Please sign in to comment.