File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,11 +96,13 @@ _install_pkgx() {
9696_should_install_pkgx () {
9797 if [ ! -f /usr/local/bin/pkgx ]; then
9898 return 0
99+ elif /usr/local/bin/pkgx --silent semverator gt \
100+ $( curl -Ssf https://pkgx.sh/VERSION) \
101+ $( /usr/local/bin/pkgx --version | awk ' {print $2}' ) > /dev/null 2>&1
102+ then
103+ return 0
99104 else
100- # if the installed version is less than the available version then upgrade
101- /usr/local/bin/pkgx --silent semverator gt \
102- $( curl -Ssf https://pkgx.sh/VERSION) \
103- $( /usr/local/bin/pkgx --version | awk ' {print $2}' ) > /dev/null 2>&1
105+ return 1
104106 fi
105107}
106108
@@ -109,7 +111,7 @@ _should_install_pkgx() {
109111if _should_install_pkgx; then
110112 _install_pkgx " $@ "
111113elif [ $# -eq 0 ]; then
112- echo " pkgx already up-to-date " >&2
114+ echo " $( pkgx --version ) already installed " >&2
113115fi
114116
115117if _is_ci; then
You can’t perform that action at this time.
0 commit comments