aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_edit.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-08-21 17:19:40 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-08-21 17:19:40 -0700
commitc0fdbfb2e813a9decd18b5f8373f09c85756d1c0 (patch)
treeb7dfcc05509026d9d12c609b40f00d3141cc658b /toolsrc/src/commands_edit.cpp
parentc56694fbce0619cda79d3c5832c961483078514f (diff)
downloadvcpkg-c0fdbfb2e813a9decd18b5f8373f09c85756d1c0.tar.gz
vcpkg-c0fdbfb2e813a9decd18b5f8373f09c85756d1c0.zip
Fix detection of 64-bit VSCode
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))
{