Skip to content
This repository was archived by the owner on May 25, 2025. It is now read-only.

Commit af07f57

Browse files
feat: runScript will now run dotenv
To complement tsx, which was previously done by ts-node
1 parent e1cc545 commit af07f57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/script/runScript.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const { DEBUG_RUN_SCRIPT } = process.env
4545
* Set env DEBUG_RUN_SCRIPT for extra debugging.
4646
*/
4747
export function runScript(fn: (...args: any[]) => any, opt: RunScriptOptions = {}): void {
48+
require('dotenv').config()
4849
logEnvironment()
4950
setGlobalStringifyFunction(inspectStringifyFn)
5051

0 commit comments

Comments
 (0)