Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading