From 476d9398b05624fcd4e91c88629ce0251f7a4ce6 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 15 Jan 2025 13:05:45 -0500 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20install=20pkgx@latest=20as=20we?= =?UTF-8?q?ll=20as=20selected=20v?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.ts | 2 +- installer.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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