Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: record that module upgrade requires at least 1 arg #1207

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

sahinf
Copy link
Contributor

@sahinf sahinf commented Dec 3, 2023

Fixes #1206
The purpose is to ensure that neorgcmd can launch the ui selector when the user doesn't provide the necessary arguments to the upgrade module.

At /neorg/lua/neorg/modules/core/neorgcmd/module.lua:258, a check is performed to ensure that at least the minimum number of arguments have been provided for the given module. The core module upgrade currently does not set this min_args property at all, resulting in an error when attempting to call :Neorg upgrade. By communicating that upgrade requires at least 1 arg, neorgcmd will be able to call the function select_next_cmd_arg at line 260.

…t ui.select goes off

At /neorg/lua/neorg/modules/core/neorgcmd/module.lua:258, a check is performed to ensure that at least the minimum number of arguments have been provided for the given module. The core module `upgrade` currently does not set this property at all, resulting in an error when attempting to call `:Neorg upgrade`. By communicating that `upgrade` requires at least 1 arg, `neorgcmd` will be able to call the function `select_next_cmd_arg` at line 260.
@sahinf
Copy link
Contributor Author

sahinf commented Dec 3, 2023

Wait luacheck failed on files I did not even touch. Did I mess something up?

@pysan3
Copy link
Contributor

pysan3 commented Dec 4, 2023

#1198 (comment)

@vhyrro
Copy link
Member

vhyrro commented Dec 26, 2023

Thank you for the fix! Don't worry about the failing checks, those are coming from a different source

@vhyrro vhyrro changed the title bugfix: Record that module upgrade requires at least 1 arg fix: record that module upgrade requires at least 1 arg Dec 26, 2023
@vhyrro vhyrro merged commit 51f55f5 into nvim-neorg:main Dec 26, 2023
1 check failed
benlubas pushed a commit to benlubas/neorg that referenced this pull request Jan 11, 2024
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.

core.default.upgrade does not launch ui.selector when not enough arguments are provided
3 participants