-
Notifications
You must be signed in to change notification settings - Fork 82
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
Bug: When opening command palette: Command failed to execute: obsidian-linter:lint-all-files-in-folder
#1182
Comments
Hey @chrisgrieser , are you using the latest BRAT release? I updated the minimum node version to 18, but recently saw that maybe some versions of Obsidian still expect 16.x. |
If it is having issues, I can see about fixing that, but the Linter is not running commands onload. |
I just double checked some code. I probably need to not assume that the editor callback will be called for a file object. I need to check if that exists and if it does not return false. The error seems to be happening on the validation check that tries to check if a command should show in the editor. |
Nope, I am on the latest regular release of the linter |
Gotcha. So that rules out the node change. I am pretty sure it is the check on this line that needs extra guards: Line 235 in b29f66c
Is the file you are looking at a custom view or is there no file open? Those are my two best guesses as to what would cause this unless it is a new bug where the Edit: I cannot really look into this myself when it comes to reproducing the error until tomorrow. |
it's a regular file. Also, I double-checked, and it appears that the error only occurs after a vault reload (by running the command |
Interesting. I will have to double check that then. Thanks for the reproduction information! |
I am not able to reproduce this issue, but I will add some logic to be more defensive when checking that logic to avoid an error. |
Here is a potential fix for this issue, but it does include the BRAT/beta features: |
Describe the Bug
An error occurs when opening the command palette for the first time after opening the vault. As far as I can tell, other than the error msg, there is nothing happening – but I do hope that the linter does not try to run commands simply when I open the command palette?
How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
No error happening.
Device
Additional Context
I am on Obsidian 1.7.3 (Insider release)
The text was updated successfully, but these errors were encountered: