diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2018-12-27 10:13:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-27 10:13:04 +0100 |
commit | ac118434eeaa0bc02ba82b5e829bb9efbe4ada9f (patch) | |
tree | e90e20d33d9b1b746444193c9a25e86e375278cb /modules/mono | |
parent | 4caa4e1af54a18a4857f16c5f1faf48db5a87450 (diff) | |
parent | b173eed8aaa39abbfa0a30513ae592f086c1f622 (diff) |
Merge pull request #24622 from Supatier/fix-vscode-w-uncommon-exec-name
Fix: Cannot find code editor: VSCode; although installed on linux
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/editor/godotsharp_editor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/mono/editor/godotsharp_editor.cpp b/modules/mono/editor/godotsharp_editor.cpp index cce86efbf5..a1f4bb3c4c 100644 --- a/modules/mono/editor/godotsharp_editor.cpp +++ b/modules/mono/editor/godotsharp_editor.cpp @@ -251,6 +251,14 @@ Error GodotSharpEditor::open_in_external_editor(const Ref<Script> &p_script, int // Try to search it again if it wasn't found last time or if it was removed from its location vscode_path = path_which("code"); } + if (vscode_path.empty() || !FileAccess::exists(vscode_path)) { + // On some Linux distro the executable has the name vscode + vscode_path = path_which("vscode"); + } + if (vscode_path.empty() || !FileAccess::exists(vscode_path)) { + // Executable name when installing VSCode directly from MS on Linux + vscode_path = path_which("visual-studio-code"); + } List<String> args; |