@gorlitzer-labs/seldon 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/seldon.js +8 -1
  2. package/package.json +1 -1
package/bin/seldon.js CHANGED
@@ -150,9 +150,16 @@ const installedAt = (pkg) => globalRoots().filter((r) => fs.existsSync(path.join
150
150
 
151
151
  // The package manager that installed seldon itself — the stack goes there too,
152
152
  // so one `npm i -g @gorlitzer-labs/seldon` never ends up split across two.
153
+ // Compare against the RESOLVED package dir, not the root: pnpm's global
154
+ // node_modules/<pkg> is a symlink into a .pnpm store beside it, so the running
155
+ // file's real path is never under the root itself.
153
156
  function homePM() {
154
157
  const self = realpath(process.argv[1] || "");
155
- return globalRoots().find((r) => r.bin && self.startsWith(realpath(r.root) + path.sep)) || null;
158
+ return globalRoots().find((r) => {
159
+ if (!r.bin) return false;
160
+ const dir = pkgDir(r.root, "@gorlitzer-labs/seldon");
161
+ return fs.existsSync(dir) && self.startsWith(realpath(dir) + path.sep);
162
+ }) || null;
156
163
  }
157
164
 
158
165
  // Pick the node package manager: --pm=<x> override (pnpm|bun|npm), else the one
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gorlitzer-labs/seldon",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Install the Seldon stack — pick your tools from a checklist; each installs via its native method.",
5
5
  "type": "module",
6
6
  "bin": {