File tree Expand file tree Collapse file tree
.github/daily-integration-test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -euo pipefail
2+ set -uo pipefail
3+
4+ fail=0
35
46if [ -d " $HOME /.nvm" ]; then
57 echo " FAIL: ~/.nvm still exists after destroy" >&2
6- exit 1
8+ ls -la " $HOME /.nvm" >&2
9+ fail=1
710fi
811
9- if [ -d " $HOME /.goenv" ] || command -v goenv > /dev/null 2>&1 ; then
10- echo " FAIL: goenv still present after destroy" >&2
11- exit 1
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
22+
23+ if command -v goenv > /dev/null 2>&1 ; then
24+ echo " FAIL: 'goenv' is still resolvable after destroy" >&2
25+ echo " command -v goenv -> $( command -v goenv) " >&2
26+ echo " type goenv -> $( type goenv 2>&1 | head -3) " >&2
27+ IFS=: read -ra _dirs <<< " $PATH"
28+ for _d in " ${_dirs[@]} " ; do
29+ [ -e " $_d /goenv" ] && echo " on PATH: $_d /goenv" >&2
30+ done
31+ if command -v brew > /dev/null 2>&1 ; then
32+ brew list --formula 2> /dev/null | grep -x goenv > /dev/null \
33+ && echo " brew still lists the goenv formula" >&2
34+ fi
35+ fail=1
1236fi
1337
38+ [ " $fail " -ne 0 ] && exit 1
39+
1440echo " nvm and goenv confirmed removed."
You can’t perform that action at this time.
0 commit comments