mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Timeout shell env sync (#2874)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
08d462ab37
commit
4daf7f6526
@ -38,7 +38,12 @@ export async function shellSync() {
|
||||
let envVars = {};
|
||||
|
||||
try {
|
||||
envVars = await shellEnv(shell);
|
||||
envVars = await Promise.race([
|
||||
shellEnv(shell),
|
||||
new Promise((_resolve, reject) => setTimeout(() => {
|
||||
reject(new Error("Resolving shell environment is taking very long. Please review your shell configuration."));
|
||||
}, 5_000))
|
||||
]);
|
||||
} catch (error) {
|
||||
logger.error(`shellEnv: ${error}`);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user