diff --git a/src/helpers.ts b/src/helpers.ts index 4f16f585..f381d782 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -153,7 +153,7 @@ export function readFile(filename: string): string { try { return readFileSync(filename, 'utf8'); } catch (error) { - throw new Error(`Cannot read file ${filename}: ${String(error)}`); + throw new Error(`Cannot read file ${filename}: ${String(error)}`, { cause: error }); } }