Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

theme-check attempts to initialise on new window and crashes #264

Closed
ConduciveMammal opened this issue Apr 19, 2021 · 3 comments · Fixed by #271
Closed

theme-check attempts to initialise on new window and crashes #264

ConduciveMammal opened this issue Apr 19, 2021 · 3 comments · Fixed by #271
Assignees
Labels
bug Something isn't working

Comments

@ConduciveMammal
Copy link

When opening a new window of VSCode, theme-check attempts to initialize but then crashes due to there being no files to process.

no implicit conversion of nil into String
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/config.rb:33:in `initialize'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/config.rb:33:in `new'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/config.rb:33:in `find'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/handler.rb:118:in `config_for_path'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/handler.rb:85:in `in_memory_storage'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/handler.rb:27:in `on_initialize'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/server.rb:96:in `process_request'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/server.rb:36:in `block in listen'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/server.rb:35:in `loop'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server/server.rb:35:in `listen'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/lib/theme_check/language_server.rb:20:in `start'
/usr/local/Cellar/theme-check/0.7.2/gems/theme-check-0.7.2/exe/theme-check-language-server:11:in `<top (required)>'
/usr/local/bin/theme-check-language-server:6:in `load'
/usr/local/bin/theme-check-language-server:6:in `<main>'
[Error - 11:02:14 AM] Connection to server got closed. Server will not be restarted.
@charlespwd charlespwd added the bug Something isn't working label Apr 19, 2021
@charlespwd charlespwd self-assigned this Apr 21, 2021
@charlespwd
Copy link
Contributor

TIL VS Code sends a rootPath of null on new windows.

{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "initialize",
  "params": {
    "processId": 9804,
    "clientInfo": {
      "name": "Visual Studio Code",
      "version": "1.55.2"
    },
    "locale": "en-us",
    "rootPath": null, // <<<<<==
    "rootUri": null,

Should be an easy fix.

@charlespwd
Copy link
Contributor

Fixed in 0.8.1.

brew update
brew upgrade theme-check

@ConduciveMammal
Copy link
Author

Hey @charlespwd, this seems to have cropped up again, unfortunately.

Theme-check version: 1.9.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants