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

Helix does not respect configured roaming profile location on Windows. #7084

Closed
Themayu opened this issue May 19, 2023 · 5 comments
Closed
Labels
C-bug Category: This is a bug

Comments

@Themayu
Copy link

Themayu commented May 19, 2023

Summary

Windows allows a user to change the location of their roaming profile folder (%AppData%) on the installation. This allows it to be moved if the profile is on a small disk, for example, or if they wish to store it on a network drive. However, Helix appears to have hardcoded the assumption that the folder will always be located at ~\AppData\Roaming, which is an incorrect assumption.

Reproduction Steps

  1. Find your AppData\Roaming folder on Windows
  2. Right-click on the folder, and click Properties. Go to Location and click Move, then select a new location.
  3. Type %AppData% into Windows Explorer to confirm that the Roaming folder is no longer located in %UserProfile%\AppData
  4. From a new terminal window, open hx and execute :config-open

Helix should open the configuration file at %AppData%\helix\config.toml.

Instead, Helix has hardcoded the location of the user's roaming profile as ~\AppData\Roaming, which is incorrect. This leads to it attempting to open %UserProfile%\AppData\Roaming\helix\config.toml as though the roaming profile location was left unchanged.

Helix log

The log file does not contain any applicable statements, but it has been provided in full anyway.

%LocalAppData%\helix\helix.log
   1   │ 2023-05-19T19:37:44.756 helix_vcs [ERROR] Error {
   2   │     context: "failed to open git repo",
   3   │     source: Discover(
   4   │         NoGitRepository {
   5   │             path: "C:\\Users\\***\\AppData\\Roaming\\helix",
   6   │         },
   7   │     ),
   8   │ }
   9   │ 2023-05-19T19:37:44.757 helix_vcs [ERROR] failed to open diff base for C:\Users\***\AppData\Roaming\helix\config.toml
  10   │ 2023-05-19T19:37:44.758 helix_vcs [ERROR] Error {
  11   │     context: "failed to open git repo",
  12   │     source: Discover(
  13   │         NoGitRepository {
  14   │             path: "C:\\Users\\***\\AppData\\Roaming\\helix",
  15   │         },
  16   │     ),
  17   │ }
  18   │ 2023-05-19T19:37:44.758 helix_vcs [ERROR] failed to obtain current head name for C:\Users\***\AppData\Roaming\helix\config.toml
  19   │ 2023-05-19T19:37:44.793 helix_view::editor [ERROR] Failed to initialize the LSP for `source.toml` { cannot find binary path }

Platform

Windows

Terminal Emulator

N/A

Helix Version

helix 23.03 (3cf0372)

@Themayu Themayu added the C-bug Category: This is a bug label May 19, 2023
@Themayu Themayu changed the title Helix does not respect configured Roaming location on Windows. Helix does not respect configured roaming profile location on Windows. May 19, 2023
@kirawi

This comment was marked as outdated.

@kirawi
Copy link
Member

kirawi commented May 19, 2023

Ah, you should actually upgrade your Helix version to 23.05. This was fixed in etcetera 0.8.

@Themayu
Copy link
Author

Themayu commented May 19, 2023

winget update --id Helix.Helix currently says that there is no applicable update for the package. winget search Helix.Helix says that the latest version is 23.03.

@kirawi
Copy link
Member

kirawi commented May 19, 2023

You'll have to wait until they update. On the other hand, I'd suggest checking the binary at https://github.com/helix-editor/helix/releases/tag/23.05 to see if it fixes this issue.

@Themayu
Copy link
Author

Themayu commented May 19, 2023

The issue is fixed on Helix 23.05.

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

No branches or pull requests

2 participants