@ran-sh/dsh-crew 2.2.17 → 2.2.18
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.
package/package.json
CHANGED
package/src/dsh-cli-runtime.mjs
CHANGED
|
@@ -198,6 +198,23 @@ export function runResolvedDsh(cli, args = [], {
|
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
+
/**
|
|
202
|
+
* Environment for a package-manager child that installs Crew's own runtime.
|
|
203
|
+
*
|
|
204
|
+
* `--prefix`/`--dir` already pin the destination and scripts are disabled, so the
|
|
205
|
+
* child cannot be redirected by a variable — but it must not be *told* about the
|
|
206
|
+
* official Harness home either. Crew's installer is routinely run from inside a
|
|
207
|
+
* DSH session, whose ambient `DSH_HOME` is `~/.dsh`, and the contract these two
|
|
208
|
+
* installers carry is "installs only under the Crew home". Dropping the variable
|
|
209
|
+
* keeps that true by construction instead of by caller discipline, which is what
|
|
210
|
+
* the unit contract asserts and what an operator shell can silently break.
|
|
211
|
+
*/
|
|
212
|
+
function packageManagerEnv(env) {
|
|
213
|
+
const child = { ...env };
|
|
214
|
+
delete child.DSH_HOME;
|
|
215
|
+
return child;
|
|
216
|
+
}
|
|
217
|
+
|
|
201
218
|
/**
|
|
202
219
|
* Install a reusable DSH CLI into Crew-owned state. This is the only helper
|
|
203
220
|
* that may invoke a package manager, and callers must explicitly opt into it.
|
|
@@ -266,11 +283,12 @@ export function ensureCrewDshRuntime({
|
|
|
266
283
|
? ['add', '--dir', runtimeRoot, '--ignore-scripts', packageSpec]
|
|
267
284
|
: ['install', '--prefix', runtimeRoot, '--no-package-lock', '--ignore-scripts', '--omit=dev', packageSpec];
|
|
268
285
|
const invocation = buildDshInvocation(packageManager, packageArgs, { platform, comspec });
|
|
286
|
+
const installEnv = packageManagerEnv(env);
|
|
269
287
|
const runInstall = () => runner(invocation.command, invocation.args, {
|
|
270
288
|
encoding: 'utf8',
|
|
271
289
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
272
290
|
shell: invocation.shell,
|
|
273
|
-
env:
|
|
291
|
+
env: installEnv,
|
|
274
292
|
});
|
|
275
293
|
const result = runInstall();
|
|
276
294
|
const cli = resolveDshCli({ home, env, platform, exists, findCommand, includeCompatibility: false, read });
|
|
@@ -457,11 +475,12 @@ export function installDshInto({
|
|
|
457
475
|
? ['add', '--dir', root, '--ignore-scripts', packageSpec]
|
|
458
476
|
: ['install', '--prefix', root, '--no-package-lock', '--ignore-scripts', '--omit=dev', packageSpec];
|
|
459
477
|
const invocation = buildDshInvocation(packageManager, packageArgs, { platform, comspec });
|
|
478
|
+
const installEnv = packageManagerEnv(env);
|
|
460
479
|
const runInstall = () => runner(invocation.command, invocation.args, {
|
|
461
480
|
encoding: 'utf8',
|
|
462
481
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
463
482
|
shell: invocation.shell,
|
|
464
|
-
env:
|
|
483
|
+
env: installEnv,
|
|
465
484
|
});
|
|
466
485
|
const result = runInstall();
|
|
467
486
|
if (result.status !== 0) {
|
package/src/runtime-identity.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export {
|
|
|
36
36
|
// included in the identity contract.
|
|
37
37
|
const RUNTIME_ID = randomUUID();
|
|
38
38
|
|
|
39
|
-
export const RUNTIME_VERSION = '2.2.
|
|
39
|
+
export const RUNTIME_VERSION = '2.2.18';
|
|
40
40
|
export const HUB_PROTOCOL_VERSION = 1;
|
|
41
41
|
|
|
42
42
|
export const HUB_CAPABILITIES = Object.freeze([
|