From 4114d87a0774fff7d8bc5e041bb56158bfdbcac8 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 13 Mar 2017 17:38:04 -0700 Subject: All Checks now take LineInfo as the first argument --- toolsrc/src/commands_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_edit.cpp') diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index ce0557e09..bc1f6715d 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -14,7 +14,7 @@ namespace vcpkg::Commands::Edit const std::string port_name = args.command_arguments.at(0); const fs::path portpath = paths.ports / port_name; - Checks::check_exit(fs::is_directory(portpath), R"(Could not find port named "%s")", port_name); + Checks::check_exit(VCPKG_LINE_INFO, fs::is_directory(portpath), R"(Could not find port named "%s")", port_name); // Find the user's selected editor std::wstring env_EDITOR; @@ -62,7 +62,7 @@ namespace vcpkg::Commands::Edit if (env_EDITOR.empty()) { - Checks::exit_with_message("Visual Studio Code was not found and the environment variable EDITOR is not set"); + Checks::exit_with_message(VCPKG_LINE_INFO, "Visual Studio Code was not found and the environment variable EDITOR is not set"); } std::wstring cmdLine = Strings::wformat(LR"("%s" "%s" "%s" -n)", env_EDITOR, portpath.native(), (portpath / "portfile.cmake").native()); -- cgit v1.2.3 From d7b4e903cb63a5b2ef71c0e7babdf7dd18260663 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 15 Mar 2017 21:17:15 -0700 Subject: [vcpkg-edit] Fix search for VSCode insiders --- toolsrc/src/commands_edit.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'toolsrc/src/commands_edit.cpp') diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp index bc1f6715d..1252790af 100644 --- a/toolsrc/src/commands_edit.cpp +++ b/toolsrc/src/commands_edit.cpp @@ -56,6 +56,12 @@ namespace vcpkg::Commands::Edit env_EDITOR = p.native(); break; } + auto p_insiders = fs::path(*code_installpath) / "Code - Insiders.exe"; + if (fs::exists(p_insiders)) + { + env_EDITOR = p_insiders.native(); + break; + } } } } -- cgit v1.2.3