Edit File by line
/home/zeestwma/.vscode-.../extensio.../github.c.../dist
File: language-server.js
#!/usr/bin/env node
[0] Fix | Delete
[1] Fix | Delete
const minNodeVersion = 20;
[2] Fix | Delete
[3] Fix | Delete
function nodeVersionError() {
[4] Fix | Delete
const version = process.versions.node;
[5] Fix | Delete
const [major] = version.split('.').map(v => parseInt(v, 10));
[6] Fix | Delete
if (major < minNodeVersion) {
[7] Fix | Delete
return `Node.js ${minNodeVersion}.x is required to run GitHub Copilot but found ${version}`;
[8] Fix | Delete
}
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
const err = nodeVersionError();
[12] Fix | Delete
if (err !== undefined) {
[13] Fix | Delete
console.error(err);
[14] Fix | Delete
// An exit code of X indicates a recommended minimum Node.js version of X.0.
[15] Fix | Delete
// Providing a recommended major version via exit code is an affordance for
[16] Fix | Delete
// implementations like Copilot.vim, where Neovim buries stderr in a log
[17] Fix | Delete
// file the user is unlikely to see.
[18] Fix | Delete
process.exit(minNodeVersion);
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
require('./main').main();
[22] Fix | Delete
[23] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function