Skip to content

Commit 79d6df8

Browse files
committed
fix: go verify uninstallation to be less strict because of github actions limitations
1 parent 3ab51fa commit 79d6df8

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/daily-integration-test/verify-destroyed.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,21 @@ if [ -d "$HOME/.nvm" ]; then
99
fail=1
1010
fi
1111

12-
if [ -d "$HOME/.goenv" ]; then
13-
echo "FAIL: ~/.goenv directory still exists after destroy" >&2
14-
ls -laR "$HOME/.goenv" >&2
15-
fail=1
16-
fi
12+
# Check for goenv itself, not for $GOENV_ROOT as a whole. On the macOS runner the Go module
13+
# cache lives at $GOENV_ROOT/shared/go-mod and is repopulated by Go tooling after the destroy,
14+
# so the bare directory existing says nothing about whether goenv is still installed.
15+
for leftover in "$HOME/.goenv/bin" "$HOME/.goenv/shims" "$HOME/.goenv/versions"; do
16+
if [ -d "$leftover" ]; then
17+
echo "FAIL: $leftover still exists after destroy" >&2
18+
ls -la "$leftover" >&2
19+
fail=1
20+
fi
21+
done
1722

1823
if command -v goenv >/dev/null 2>&1; then
1924
echo "FAIL: 'goenv' is still resolvable after destroy" >&2
2025
echo " command -v goenv -> $(command -v goenv)" >&2
2126
echo " type goenv -> $(type goenv 2>&1 | head -3)" >&2
22-
echo " PATH -> $PATH" >&2
2327
IFS=: read -ra _dirs <<< "$PATH"
2428
for _d in "${_dirs[@]}"; do
2529
[ -e "$_d/goenv" ] && echo " on PATH: $_d/goenv" >&2

0 commit comments

Comments
 (0)