mirror of
https://github.com/goauthentik/authentik
synced 2026-05-12 18:06:21 +02:00
* web: Flesh out Playwright. web: Flesh out slim tests. * web/e2e: Sessions * web: Update tests. * web: Fix missing git hash when using docker as backend. * Fix selectors. * web: Flesh out a11y in wizard elements. * web: Flesh out provider tests.
19 lines
500 B
JavaScript
19 lines
500 B
JavaScript
/**
|
|
* @file Load the contents of an environment file into `process.env`.
|
|
*/
|
|
import { MonoRepoRoot } from "#paths/node";
|
|
import { existsSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
const envFilePath = join(MonoRepoRoot, ".env");
|
|
|
|
if (existsSync(envFilePath)) {
|
|
console.debug(`Loading environment from ${envFilePath}`);
|
|
|
|
try {
|
|
process.loadEnvFile(envFilePath);
|
|
} catch (error) {
|
|
console.warn(`Failed to load environment from ${envFilePath}:`, error);
|
|
}
|
|
}
|