diff --git a/bin/index.js b/bin/index.js index 6e0d37d9..50683dab 100755 --- a/bin/index.js +++ b/bin/index.js @@ -1,6 +1,12 @@ #!/usr/bin/env node -import dotenv from "dotenv"; -dotenv.config({ quiet: true }); + +// Load .env file if it exists (quiet - no error if missing) +try { + process.loadEnvFile(); +} +catch { + // .env file not found or not readable - ignore silently +} // Import Node.js Dependencies import path from "node:path"; diff --git a/package.json b/package.json index a91f6cb7..027eb476 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,6 @@ "@topcli/pretty-json": "^1.0.0", "@topcli/prompts": "^2.0.0", "@topcli/spinner": "^4.0.0", - "dotenv": "^17.0.0", "filenamify": "^7.0.0", "highlightjs-line-numbers.js": "^2.8.0", "ini": "^6.0.0", diff --git a/test/commands/cache.test.js b/test/commands/cache.test.js index 60f47b13..65e8e7b6 100644 --- a/test/commands/cache.test.js +++ b/test/commands/cache.test.js @@ -1,5 +1,10 @@ -import dotenv from "dotenv"; -dotenv.config({ quiet: true }); +// Load .env file if it exists (quiet - no error if missing) +try { + process.loadEnvFile(); +} +catch { + // .env file not found or not readable - ignore silently +} // Import Node.js Dependencies import fs from "node:fs"; diff --git a/test/commands/summary.test.js b/test/commands/summary.test.js index a46c41ec..150e92d6 100644 --- a/test/commands/summary.test.js +++ b/test/commands/summary.test.js @@ -1,5 +1,10 @@ -import dotenv from "dotenv"; -dotenv.config({ quiet: true }); +// Load .env file if it exists (quiet - no error if missing) +try { + process.loadEnvFile(); +} +catch { + // .env file not found or not readable - ignore silently +} // Import Node.js Dependencies import { fileURLToPath } from "node:url"; diff --git a/test/commands/verify.test.js b/test/commands/verify.test.js index 2ddfaf38..274d6670 100644 --- a/test/commands/verify.test.js +++ b/test/commands/verify.test.js @@ -1,5 +1,10 @@ -import dotenv from "dotenv"; -dotenv.config({ quiet: true }); +// Load .env file if it exists (quiet - no error if missing) +try { + process.loadEnvFile(); +} +catch { + // .env file not found or not readable - ignore silently +} // Import Node.js Dependencies import { fileURLToPath } from "node:url";