fix: load shell environment variables on app startup (#7223)

Add shell-env integration to fetch environment variables from the user's
shell config files (.zshrc, .zshenv, etc.) so that proxy settings and
other exports are available in process.env for both Electron and CLI.
This commit is contained in:
lohit
2026-02-19 15:47:27 +00:00
committed by GitHub
parent 2fcfdfc338
commit 6ea079f6b1
7 changed files with 105 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
const yargs = require('yargs');
const chalk = require('chalk');
const { initializeShellEnv } = require('@usebruno/requests');
const { CLI_EPILOGUE, CLI_VERSION } = require('./constants');
@@ -8,6 +9,9 @@ const printBanner = () => {
};
const run = async () => {
// Fetch shell environment (useful when CLI is run as subprocess from GUI app or cron)
await initializeShellEnv();
const argLength = process.argv.length;
const commandsToPrintBanner = ['--help', '-h'];