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 os from "os";
|
||||||
import { app } from "electron";
|
import { app } from "electron";
|
||||||
import logger from "./logger";
|
import logger from "./logger";
|
||||||
|
import { isSnap } from "../common/vars";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shellSync loads what would have been the environment if this application was
|
* shellSync loads what would have been the environment if this application was
|
||||||
@ -39,11 +40,14 @@ export async function shellSync() {
|
|||||||
env.LANG += ".UTF-8";
|
env.LANG += ".UTF-8";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isSnap) {
|
||||||
|
process.env.PATH = env.PATH;
|
||||||
|
}
|
||||||
|
|
||||||
// The spread operator allows joining of objects. The precedence is last to first.
|
// The spread operator allows joining of objects. The precedence is last to first.
|
||||||
process.env = {
|
process.env = {
|
||||||
...env,
|
...env,
|
||||||
...process.env,
|
...process.env,
|
||||||
PATH: env.PATH,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
logger.debug(`[SHELL-SYNC]: Synced shell env, and updating`, env, process.env);
|
logger.debug(`[SHELL-SYNC]: Synced shell env, and updating`, env, process.env);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user