@ai-ecoverse/slicc-kernel 1.196.37 → 1.196.38

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.
@@ -5303,7 +5303,7 @@ function satisfies(version, range2) {
5303
5303
  }
5304
5304
 
5305
5305
  // src/version.ts
5306
- var KERNEL_VERSION = true ? "1.196.37" : "0.0.0-dev";
5306
+ var KERNEL_VERSION = true ? "1.196.38" : "0.0.0-dev";
5307
5307
  var OS_RELEASE = "6.0.0-slicc";
5308
5308
  function procVersion() {
5309
5309
  return `Linux version ${OS_RELEASE} (slicc-kernel ${KERNEL_VERSION}) #1 SMP PREEMPT_DYNAMIC
@@ -5452,12 +5452,22 @@ async function withPackagePaths(fs, pkg, command, provenance) {
5452
5452
  if (!command.env) return command;
5453
5453
  const env = {};
5454
5454
  const envPaths = /* @__PURE__ */ new Set();
5455
+ const missingEnv = {};
5455
5456
  for (const [key, value2] of Object.entries(command.env)) {
5456
5457
  const path = !value2.startsWith("/") && value2.includes("/") && inside(pkg, value2);
5457
- if (path && provenance) envPaths.add(path);
5458
- env[key] = path && await fs.exists(path) ? path : value2;
5458
+ const present4 = path && await fs.exists(path);
5459
+ if (path && provenance) {
5460
+ envPaths.add(path);
5461
+ if (!present4) missingEnv[key] = { pkg, value: value2 };
5462
+ }
5463
+ env[key] = present4 ? path : value2;
5459
5464
  }
5460
- return { ...command, env, ...envPaths.size ? { envPaths: [...envPaths] } : {} };
5465
+ return {
5466
+ ...command,
5467
+ env,
5468
+ ...envPaths.size ? { envPaths: [...envPaths] } : {},
5469
+ ...Object.keys(missingEnv).length ? { missingEnv } : {}
5470
+ };
5461
5471
  }
5462
5472
  async function packages(fs, modules) {
5463
5473
  const names2 = await fs.readdir(modules).catch(() => []);
@@ -38944,14 +38954,16 @@ function interpreter(head) {
38944
38954
  }
38945
38955
  function expandDefaults(defaults2, env) {
38946
38956
  const out = {};
38947
- for (const [key, value2] of Object.entries(defaults2 ?? {})) {
38957
+ for (const [key, entry] of Object.entries(defaults2 ?? {})) {
38948
38958
  let missing7 = false;
38959
+ const value2 = typeof entry === "string" ? entry : entry.value;
38949
38960
  const expanded = value2.replace(ENV_REFERENCE, (_, name2) => {
38950
38961
  const set3 = Object.hasOwn(env, name2) ? env[name2] : void 0;
38951
38962
  if (set3 === void 0) missing7 = true;
38952
38963
  return set3 ?? "";
38953
38964
  });
38954
- if (!missing7) out[key] = expanded;
38965
+ if (missing7) continue;
38966
+ out[key] = typeof entry !== "string" && !expanded.startsWith("/") ? `${entry.pkg}/${expanded.replace(/^\.\//, "")}` : expanded;
38955
38967
  }
38956
38968
  return out;
38957
38969
  }
@@ -38965,7 +38977,7 @@ function targetOf(command, reads) {
38965
38977
  argv0: command.argv0,
38966
38978
  ...command.argv0Fixed ? { fixed: true } : {},
38967
38979
  ...command.args ? { prefix: command.args } : {},
38968
- ...command.env ? { env: command.env } : {},
38980
+ ...command.env ? { env: { ...command.env, ...command.missingEnv } } : {},
38969
38981
  ...command.unset ? { unset: command.unset } : {},
38970
38982
  ...command.imports ? { imports: command.imports } : {},
38971
38983
  ...command.preopenRoot ? { preopenRoot: true } : {},
@@ -38993,7 +39005,7 @@ function withScriptEnv(target, command) {
38993
39005
  if (!command) return target;
38994
39006
  return {
38995
39007
  ...target,
38996
- env: { ...target.env, ...command.env },
39008
+ env: { ...target.env, ...command.env, ...command.missingEnv },
38997
39009
  unset: [
38998
39010
  ...(target.unset ?? []).filter((key) => !Object.hasOwn(command.env ?? {}, key)),
38999
39011
  ...command.unset ?? []