mirror of https://github.com/onivim/oni.git
* Set 'LANG' environment variable on Mac if not set to workaround crash * Fix lint
This commit is contained in:
parent
3c1ef98f4e
commit
6128e77ced
|
@ -155,14 +155,28 @@ export class Process implements Oni.Process {
|
|||
existingPath = process.env.Path || process.env.PATH
|
||||
}
|
||||
|
||||
const additionalEnvironmentVariables =
|
||||
configuration.getValue("environment.additionalVariables") || {}
|
||||
|
||||
const requiredOptions = {
|
||||
env: {
|
||||
...process.env,
|
||||
...this._env,
|
||||
...originalSpawnOptions.env,
|
||||
...additionalEnvironmentVariables,
|
||||
},
|
||||
}
|
||||
|
||||
// TODO: Workaround for the bug fix here:
|
||||
// https://github.com/neovim/neovim/pull/9345
|
||||
// Once 0.3.2 is available and we've switched, we won't need this anymore.
|
||||
if (Platform.isMac() && !requiredOptions.env.LANG) {
|
||||
requiredOptions.env.LANG = "en_us.UTF-8"
|
||||
Log.warn(
|
||||
"'LANG' environment variable not set, using default value of 'en_us.UTF-8'. Consider setting environment.additionalVariables['LANG'].",
|
||||
)
|
||||
}
|
||||
|
||||
requiredOptions.env.PATH = this.mergePathEnvironmentVariable(
|
||||
existingPath,
|
||||
configuration.getValue("environment.additionalPaths"),
|
||||
|
|
|
@ -176,6 +176,7 @@ const BaseConfiguration: IConfigurationValues = {
|
|||
"explorer.maxUndoFileSizeInBytes": 500_000,
|
||||
|
||||
"environment.additionalPaths": [],
|
||||
"environment.additionalVariables": {},
|
||||
|
||||
"keyDisplayer.showInInsertMode": false,
|
||||
|
||||
|
|
|
@ -214,6 +214,9 @@ export interface IConfigurationValues {
|
|||
// (and available in terminal integration, later)
|
||||
"environment.additionalPaths": string[]
|
||||
|
||||
// Additional environment variables that override the default settings
|
||||
"environment.additionalVariables": any
|
||||
|
||||
// User configurable array of files for which
|
||||
// the image layer opens
|
||||
"editor.imageLayerExtensions": string[]
|
||||
|
|
Loading…
Reference in New Issue