diff options
| author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-04-16 08:35:14 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-06-05 10:09:32 +0000 |
| commit | f3621d1d0bb491b14f5f489a237048fbf2a4a349 (patch) | |
| tree | a9e5dfc71b178258d099e842ed8544b7030982a0 | |
| parent | vscode: move asar to nativeBuildInputs (diff) | |
| download | nixpkgs-f3621d1d0bb491b14f5f489a237048fbf2a4a349.tar.gz | |
vscode: fix auto encoding detection crashing editor window
Closes #152939
(cherry picked from commit 2ca1c986175e864bb67a955a4189f7acf51f8b1b)
| -rw-r--r-- | pkgs/applications/editors/vscode/generic.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 1a0039b18d2d..029d08a5c2e7 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -123,6 +123,12 @@ let --replace "/bin/bash" "${bash}/bin/bash" rm -rf "$packed" + # without this symlink loading JsChardet, the library that is used for auto encoding detection when files.autoGuessEncoding is true, + # fails to load with: electron/js2c/renderer_init: Error: Cannot find module 'jschardet' + # and the window immediately closes which renders VSCode unusable + # see https://github.com/NixOS/nixpkgs/issues/152939 for full log + ln -rs "$unpacked" "$packed" + # this fixes bundled ripgrep chmod +x resources/app/node_modules/@vscode/ripgrep/bin/rg ''; |
