diff --git a/.github/workflows/ci.action.yml b/.github/workflows/ci.action.yml index a5691bdf..2d8733f2 100644 --- a/.github/workflows/ci.action.yml +++ b/.github/workflows/ci.action.yml @@ -5,6 +5,8 @@ on: - action.ts - action.yml - package.json + - installer.sh + - .github/workflows/ci.action.yml concurrency: group: ${{ github.ref || 'ci' }}/action.ts @@ -31,7 +33,7 @@ jobs: name: dist path: dist - uses: ./ - - run: pkgx --version + - run: if [[ $(pkgx --version) != "pkgx "1.* ]]; then exit 1; fi plus-pkgs: needs: dist diff --git a/action.ts b/action.ts index 454ffb3b..50098160 100644 --- a/action.ts +++ b/action.ts @@ -72,7 +72,7 @@ async function go() { // use our installer to install any required pre-requisites from the system packager const installer_script = path.join(path.dirname(__filename), "installer.sh") if (process.getuid && process.getuid() == 0) { - await exec(installer_script) + await exec(installer_script, [], { env: {...process.env, PKGX_ONLY_INSTALL_PREREQS: '1' } }) } else { await exec('sudo', [installer_script]) } diff --git a/installer.sh b/installer.sh index 6ff353de..e0a71758 100755 --- a/installer.sh +++ b/installer.sh @@ -147,6 +147,11 @@ _should_install_pkgx() { ########################################################################### meat +if [ "$PKGX_ONLY_INSTALL_PREREQS" = 1 ]; then + _install_pre_reqs + exit 0 +fi + if _should_install_pkgx; then _install_pkgx "$@" elif [ $# -eq 0 ]; then