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

hx panics using the command "hx --health" on a fresh install #7584

Closed
soufianeamini opened this issue Jul 9, 2023 · 2 comments · Fixed by #7585
Closed

hx panics using the command "hx --health" on a fresh install #7584

soufianeamini opened this issue Jul 9, 2023 · 2 comments · Fixed by #7585
Labels
C-bug Category: This is a bug

Comments

@soufianeamini
Copy link

Summary

Program panicks when trying to check health instead of providing a helpful error message.

Reproduction Steps

I have installed (fresh install for the first time) helix-editor from its sources following the installation guide, and when trying to install a language server using this: https://docs.helix-editor.com/lang-support.html I was told to check the language support with hx --health, and the program panicked, without providing an error message.

$hx --health
thread 'main' panicked at 'called Option::unwrap() on a None value', helix-loader/src/lib.rs:124:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Helix log

Log file:

2023-07-09T16:16:24.429 helix_view::editor [ERROR] editor error: 1 unsaved buffer(s) remaining: ["[scratch]"]
2023-07-09T16:17:17.501 helix_lsp::transport [ERROR] rust-analyzer err: <- StreamClosed
2023-07-09T16:19:50.267 helix_view::editor [ERROR] editor error: Failed to start debug session: cannot find binary path
2023-07-09T16:24:08.843 helix_view::editor [ERROR] editor error: no such command: 'Q'
2023-07-09T16:24:09.845 helix_view::editor [ERROR] editor error: 1 unsaved buffer(s) remaining: ["src/main.rs"]

Platform

WSL2

Terminal Emulator

Hyperjs

Helix Version

helix 23.05 (828c743)

@soufianeamini soufianeamini added the C-bug Category: This is a bug label Jul 9, 2023
@the-mikedavis
Copy link
Member

Looks like this is a bug introduced in #7573. These config and log file initialization lines should be moved higher in main, above the health and probably all the other flags too

helix_loader::initialize_config_file(args.config_file.clone());
helix_loader::initialize_log_file(args.log_file.clone());

\cc @alevinval

@alevinval
Copy link
Contributor

Unfortunately, you just hit this issue some minutes after it got introduced. I did not think about the --health command already requiring initialized configuration, here's a fix: #7585

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants