diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-08-21 17:19:40 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-08-21 17:19:40 -0700 |
| commit | c0fdbfb2e813a9decd18b5f8373f09c85756d1c0 (patch) | |
| tree | b7dfcc05509026d9d12c609b40f00d3141cc658b /toolsrc/src/commands_edit.cpp | |
| parent | c56694fbce0619cda79d3c5832c961483078514f (diff) | |
| download | vcpkg-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.cpp | 9 |
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)) { |
