mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-24 06:14:01 +08:00
11 lines
421 B
TypeScript
11 lines
421 B
TypeScript
// @exit: 1
|
|
// An uncaught fs error exits with code 1 exactly like Node, with all
|
|
// pre-throw stdout intact. (stderr differs — Node prints a stack trace,
|
|
// scriptc prints `Uncaught <message>` — and is not compared.)
|
|
import { readFileSync } from "node:fs";
|
|
|
|
console.log("phase one");
|
|
console.log("phase two");
|
|
const text = readFileSync("tmp-995-no-such-file-anywhere.txt", "utf8");
|
|
console.log("unreachable", text);
|