From c0fdbfb2e813a9decd18b5f8373f09c85756d1c0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 21 Aug 2017 17:19:40 -0700 Subject: Fix detection of 64-bit VSCode --- toolsrc/src/commands_edit.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'toolsrc/src') 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 @@ -30,6 +30,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"; -- cgit v1.2.3