Skip to content

Commit ba7e2b4

Browse files
committed
fix: .env path handling
1 parent 055f01b commit ba7e2b4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/agent-api/src/user-db-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { DefaultAzureCredential } from '@azure/identity';
33
import path from 'node:path';
44
import dotenv from 'dotenv';
55

6-
dotenv.config({ path: path.join(__dirname, '../../../.env') });
6+
dotenv.config({ path: path.join(process.cwd(), '../../.env') });
77

88
export class UserDbService {
99
private static instance: UserDbService;

packages/burger-api/src/blob-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { DefaultAzureCredential } from '@azure/identity';
55
import dotenv from "dotenv";
66

77
// Env file is located in the root of the repository
8-
dotenv.config({ path: path.join(__dirname, "../../../.env") });
8+
dotenv.config({ path: path.join(process.cwd(), "../../.env") });
99

1010
export class BlobService {
1111
private static instance: BlobService;

packages/burger-api/src/db-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import toppingsData from '../data/toppings.json';
1010
import dotenv from "dotenv";
1111

1212
// Env file is located in the root of the repository
13-
dotenv.config({ path: path.join(__dirname, "../../../.env") });
13+
dotenv.config({ path: path.join(process.cwd(), "../../.env") });
1414

1515
// Helper to strip properties starting with underscore from an object
1616
function stripUnderscoreProps<T extends object>(obj: T): T {

0 commit comments

Comments
 (0)