mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
fix(config): load dotenv before --check so ~/.config/gmgn/.env is read
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { config as loadDotenv } from "dotenv";
|
||||
import { Command } from "commander";
|
||||
import * as crypto from "crypto";
|
||||
import * as fs from "fs";
|
||||
@@ -103,6 +104,8 @@ export function registerConfigCommands(program: Command): void {
|
||||
const lang = detectLang();
|
||||
|
||||
if (opts.check) {
|
||||
loadDotenv({ path: ENV_FILE, override: true });
|
||||
loadDotenv();
|
||||
process.exit(process.env.GMGN_API_KEY ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user