mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Don't override PATH under snap
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
7ce0cf436a
commit
c99954e81f
@ -23,6 +23,7 @@ import { shellEnv } from "./utils/shell-env";
|
||||
import os from "os";
|
||||
import { app } from "electron";
|
||||
import logger from "./logger";
|
||||
import { isSnap } from "../common/vars";
|
||||
|
||||
/**
|
||||
* shellSync loads what would have been the environment if this application was
|
||||
@ -39,11 +40,14 @@ export async function shellSync() {
|
||||
env.LANG += ".UTF-8";
|
||||
}
|
||||
|
||||
if (!isSnap) {
|
||||
process.env.PATH = env.PATH;
|
||||
}
|
||||
|
||||
// The spread operator allows joining of objects. The precedence is last to first.
|
||||
process.env = {
|
||||
...env,
|
||||
...process.env,
|
||||
PATH: env.PATH,
|
||||
};
|
||||
|
||||
logger.debug(`[SHELL-SYNC]: Synced shell env, and updating`, env, process.env);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user