Skip to content

Commit f8bc90e

Browse files
committed
wip
1 parent b605b85 commit f8bc90e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ jobs:
9292
XDG_DATA_HOME: /tmp/foo
9393
9494
- run: |
95+
which node
9596
sudo ./pkgm.ts i node@22 dev
97+
which node
9698
[[ $(node --version) = v22* ]] || exit 2
9799
mkdir foo
98100
cd foo

pkgm.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,15 @@ async function install(args: string[], basePath: string) {
136136
`${x.pkg.project}/v${x.pkg.version}`
137137
);
138138

139+
// get the pkgx_dir this way as it is a) more reliable and b) the only way if
140+
// we are running as sudo on linux since it doesn’t give us a good way to get
141+
// the home directory of the pre-sudo user
139142
const pkgx_dir = (() => {
140143
const {path, pkg} = json.pkgs[0]!
141144
const remove = pkg.project + "/v" + pkg.version;
142145
return path.string.slice(0, - remove.length - 1 );
143146
})()
144147

145-
console.error("FLUBBER", pkgx_dir);
146-
147148
const runtime_env = expand_runtime_env(json, basePath);
148149

149150
const dst = basePath;

0 commit comments

Comments
 (0)