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 84725b0 commit 0e3d3ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
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 0e3d3ef

Please sign in to comment.