mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[code] Remove the useless deps download control option (#43940)
The `installGoDependency` should be the only way to notify go langserver to install the deps.
This commit is contained in:
parent
833d662a6c
commit
4be35ba0ce
1 changed files with 1 additions and 11 deletions
|
@ -14,9 +14,9 @@ import { Logger } from '../log';
|
|||
import { ServerOptions } from '../server_options';
|
||||
import { LoggerFactory } from '../utils/log_factory';
|
||||
import { AbstractLauncher } from './abstract_launcher';
|
||||
import { ExternalProgram } from './process/external_program';
|
||||
import { LanguageServerProxy } from './proxy';
|
||||
import { InitializeOptions, RequestExpander } from './request_expander';
|
||||
import { ExternalProgram } from './process/external_program';
|
||||
|
||||
const GO_LANG_DETACH_PORT = 2091;
|
||||
|
||||
|
@ -98,15 +98,6 @@ export class GoServerLauncher extends AbstractLauncher {
|
|||
if (!fs.existsSync(goPath)) {
|
||||
fs.mkdirSync(goPath);
|
||||
}
|
||||
let go111MODULE = 'off';
|
||||
if (this.options.security.installGoDependency) {
|
||||
// There are no proper approaches to disable downloading go dependencies except creating inconsistencies of the
|
||||
// running environments of go-langserver. Given that go language server will do its best to convert the repos
|
||||
// into modules, one of the doable approaches is setting 'GO111MODULE' to false to be incompatible with the
|
||||
// moduled repos.
|
||||
go111MODULE = 'on';
|
||||
}
|
||||
|
||||
const params: string[] = ['-port=' + port.toString()];
|
||||
const golsp = path.resolve(installationPath, launchersFound[0]);
|
||||
const p = spawn(golsp, params, {
|
||||
|
@ -119,7 +110,6 @@ export class GoServerLauncher extends AbstractLauncher {
|
|||
GOROOT: goRoot,
|
||||
GOPATH: goPath,
|
||||
PATH: envPath,
|
||||
GO111MODULE: go111MODULE,
|
||||
CGO_ENABLED: '0',
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue