@ai-ecoverse/slicc-kernel 1.28.0 → 1.29.0

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/dist/node.js CHANGED
@@ -3059,6 +3059,7 @@ function commandOf(pkg, name2, raw, packageAbi, shared) {
3059
3059
  glue,
3060
3060
  wasm,
3061
3061
  argv0,
3062
+ ...raw.argv0Path === true ? { argv0Path: true } : {},
3062
3063
  ...args ? { args } : {},
3063
3064
  ...withEnv,
3064
3065
  ...imports ? { imports } : {}
@@ -9685,9 +9686,14 @@ var Launcher = class {
9685
9686
  const command = (await this.commands()).get(name2);
9686
9687
  return command && !command.script ? targetOf(command) : void 0;
9687
9688
  }
9688
- const glue = await followLinks(this.base, this.fs.resolvePath(cwd, file));
9689
+ const path = this.fs.resolvePath(cwd, file);
9690
+ const glue = await followLinks(this.base, path);
9689
9691
  const linked = COMMAND2.exec(glue)?.[1];
9690
- if (linked !== void 0) return this.resolve(`/bin/${linked}`, argv0, cwd);
9692
+ if (linked !== void 0) {
9693
+ const target = await this.resolve(`/bin/${linked}`, argv0, cwd);
9694
+ const byPath = !COMMAND2.test(path) && (await this.commands()).get(linked)?.argv0Path === true;
9695
+ return target && byPath ? { ...target, argv0: path } : target;
9696
+ }
9691
9697
  const head = await this.head(glue);
9692
9698
  if (!head) return void 0;
9693
9699
  if (isWasm(head)) {