aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/commands_edit.cpp')
-rw-r--r--toolsrc/src/commands_edit.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index 4e83fcca8..12ddaad77 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -32,6 +32,15 @@ namespace vcpkg::Commands::Edit
if (env_EDITOR.empty())
{
+ const fs::path CODE_EXE_PATH = System::get_ProgramFiles_platform_bitness() / "Microsoft VS Code/Code.exe";
+ if (fs.exists(CODE_EXE_PATH))
+ {
+ env_EDITOR = CODE_EXE_PATH;
+ }
+ }
+
+ if (env_EDITOR.empty())
+ {
const fs::path CODE_EXE_PATH = System::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe";
if (fs.exists(CODE_EXE_PATH))
{