MCPcopy Index your code
hub / github.com/deepnote/deepnote / readDotEnv

Function readDotEnv

packages/cli/src/utils/dotenv.ts:71–81  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

69 * @returns Parsed environment variables
70 */
71export async function readDotEnv(filePath: string): Promise<dotenv.DotenvParseOutput> {
72 try {
73 const content = await fs.readFile(filePath, 'utf-8')
74 return dotenv.parse(content)
75 } catch (error) {
76 if (isErrnoENOENT(error)) {
77 return {}
78 }
79 throw error
80 }
81}
82
83/**
84 * Update a .env file with new values.

Callers 6

dotenv.test.tsFile · 0.90
editIntegrationFunction · 0.90
parseIntegrationsFileFunction · 0.90

Calls 1

isErrnoENOENTFunction · 0.90

Tested by

no test coverage detected