Skip to content

Relax validation for copilot_node_command#527

Merged
AntoineGS merged 7 commits intozbirenbaum:masterfrom
timhugh:relax-node-cmd-validation
Aug 15, 2025
Merged

Relax validation for copilot_node_command#527
AntoineGS merged 7 commits intozbirenbaum:masterfrom
timhugh:relax-node-cmd-validation

Conversation

@timhugh
Copy link
Copy Markdown
Contributor

@timhugh timhugh commented Aug 3, 2025

Resolves #498, where we found that copilot_node_command would not allow commands that alias through version managers like mise x node@24 --node, which is a problem when working on a project that uses a node version older than 20.x.

This removes the vim.fn.executable checks and just relies on the node --version output to determine if the configured command is usable or not, and slightly tweaks the way the command table is handled.

timhugh added 6 commits July 24, 2025 21:43
* use vim.system for version check in place of vim.fn.systemlist
* disable executable check
it looks like these got commented out for use with the github workflow
@timhugh
Copy link
Copy Markdown
Contributor Author

timhugh commented Aug 3, 2025

NB: I initially made some changes to the makefile to run tests locally, but it looks like those changes were intentional to support github CI workflow, so I just restored it back to where it was when I found it

@AntoineGS
Copy link
Copy Markdown
Collaborator

Thank you!
I won't be able to test/merge it for about 1.5 weeks as I am away but I will do so when I have the chance.

@timhugh
Copy link
Copy Markdown
Contributor Author

timhugh commented Aug 4, 2025

No problem, it took me over a week to get the PR together 😂 Let me know if/when you have any questions or feedback, happy to keep driving this

@AntoineGS AntoineGS force-pushed the relax-node-cmd-validation branch from 4d5242c to 80540d8 Compare August 15, 2025 00:45
@AntoineGS
Copy link
Copy Markdown
Collaborator

I made a small improvement to the way it behave when nodejs is not found as it would nag constantly.
(This is probably an existing issue on master too).
Merging :P

@AntoineGS AntoineGS merged commit f122741 into zbirenbaum:master Aug 15, 2025
@timhugh
Copy link
Copy Markdown
Contributor Author

timhugh commented Aug 16, 2025

Good catch. Thanks for merging that up!

@timhugh timhugh deleted the relax-node-cmd-validation branch August 16, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support list/non-executable for copilot_node_command

2 participants