Skip to content

Commit 8d315e8

Browse files
author
Juliette Cordor
committed
fixed node version
1 parent 8ba151a commit 8d315e8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

autoload/copilot.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ function! s:commands.version(opts) abort
671671
let info = copilot#agent#EditorInfo()
672672
echo 'copilot.vim ' .info.editorPluginInfo.version
673673
echo info.editorInfo.name . ' ' . info.editorInfo.version
674-
if exists('s:agent.node_version')
674+
if exists('s:')
675675
echo 'copilot/dist/agent.js ' . s:agent.Call('getVersion', {}).version
676676
echo 'Node.js ' . s:agent.node_version
677677
else

autoload/copilot/agent.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ function! s:Command() abort
375375
endif
376376
let node_version = matchstr(join(out, ''), '^v\zs\d\+\.[^[:space:]]*')
377377
let major = str2nr(node_version)
378-
let too_new = major >= 18
378+
let too_new = major == 0
379379
if !get(g:, 'copilot_ignore_node_version')
380380
if major == 0
381381
return [v:null, node_version, 'Could not determine Node.js version']
382382
elseif (major < 16 || too_new) && s:IsArmMacOS()
383383
return [v:null, node_version, 'Node.js version 16.x or 17.x required on Apple Silicon but found ' . node_version]
384384
elseif major < 12 || too_new
385-
return [v:null, node_version, 'Node.js version 12.x–17.x required but found ' . node_version]
385+
return [v:null, node_version, 'Node.js version 12.x–17.x required but found ' . major]
386386
endif
387387
endif
388388
let agent = get(g:, 'copilot_agent_command', '')

0 commit comments

Comments
 (0)