mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-29 23:54:24 +00:00
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:
@@ -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'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user