Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions packages/bruno-electron/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,18 @@ app.on('ready', async () => {

// Initialize system proxy cache early (non-blocking)
const { fetchSystemProxy } = require('./store/system-proxy');
waitForShellEnv().then(() => {
fetchSystemProxy().catch((err) => {
console.warn('Failed to initialize system proxy cache:', err);

// Note: irrespective of the state of the shell,
// try to fetch the system proxy information
waitForShellEnv()
.catch((err) => {
console.warn('Shell env init failed:', err);
})
.finally(() => {
fetchSystemProxy().catch((err) => {
console.warn('Failed to initialize system proxy cache:', err);
});
});
});

Menu.setApplicationMenu(menu);
const { maximized, x, y, width, height } = loadWindowState();
Expand Down
1 change: 1 addition & 0 deletions packages/bruno-electron/src/store/shell-env-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const { initializeShellEnv: _initializeShellEnv } = require('@usebruno/requests'

const TIMEOUT_MS = 60_000;

/** @type {null | Promise<any>} */
let _promise = null;

const _initWithTimeout = () => {
Expand Down
Loading