Skip to content

Commit

Permalink
don’t install pkgx@latest as well as selected v
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 15, 2025
1 parent 0d491eb commit 476d939
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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])
}
Expand Down
5 changes: 5 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 476d939

Please sign in to comment.