aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_edit.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-02-14 16:23:02 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-02-14 16:23:02 -0800
commita7c5063d4d08c44c100eb62726ef31a95c1e5121 (patch)
treed28f395ceeea5bc16a48e4b1cb582ab852b2c948 /toolsrc/src/commands_edit.cpp
parentb882f365e9aebf95c07c8667e38ae2730931f74e (diff)
downloadvcpkg-a7c5063d4d08c44c100eb62726ef31a95c1e5121.tar.gz
vcpkg-a7c5063d4d08c44c100eb62726ef31a95c1e5121.zip
Add functions to find the Program Files folders on the C++ side. Resolves #606
Diffstat (limited to 'toolsrc/src/commands_edit.cpp')
-rw-r--r--toolsrc/src/commands_edit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index 1487c759d..50308cec9 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -2,6 +2,7 @@
#include "vcpkg_Commands.h"
#include "vcpkg_System.h"
#include "vcpkg_Input.h"
+#include "vcpkg_Environment.h"
namespace vcpkg::Commands::Edit
{
@@ -24,7 +25,7 @@ namespace vcpkg::Commands::Edit
}
else
{
- static const std::wstring CODE_EXE_PATH = LR"(C:\Program Files (x86)\Microsoft VS Code\Code.exe)";
+ static const fs::path CODE_EXE_PATH = Environment::get_ProgramFiles_32_bit() / "Microsoft VS Code/Code.exe";
if (fs::exists(CODE_EXE_PATH))
{
env_EDITOR = CODE_EXE_PATH;