Files
scriptc/tests/corpus/1468-exec-path.ts
2026-07-22 18:08:04 -05:00

12 lines
496 B
TypeScript

// process.execPath: the compiled binary's own resolved absolute path —
// Node's is the node executable's (SEMANTICS.md divergence 12, the
// argv[0]/argv[1] precedent), so the corpus asserts the CONTRACT the two
// worlds share (an absolute, non-empty, stable path), never the value.
import { isAbsolute, basename } from "node:path";
const p = process.execPath;
console.log(isAbsolute(p));
console.log(p.length > 0);
console.log(p === process.execPath);
console.log(basename(p).length > 0);