mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-20 05:40:17 +08:00
12 lines
496 B
TypeScript
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);
|