aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_edit.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-01-13 02:09:08 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2017-01-13 02:09:08 -0800
commitfe2c0a3a78f4904288ce958ded767160d1de260c (patch)
tree8495271cbe3790d822202146248b1e41165a58f0 /toolsrc/src/commands_edit.cpp
parentcc8851144a871931b93d84bd962364159ad1c424 (diff)
downloadvcpkg-fe2c0a3a78f4904288ce958ded767160d1de260c.tar.gz
vcpkg-fe2c0a3a78f4904288ce958ded767160d1de260c.zip
[edit command] Now checks that port exists before opening
Diffstat (limited to 'toolsrc/src/commands_edit.cpp')
-rw-r--r--toolsrc/src/commands_edit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/toolsrc/src/commands_edit.cpp b/toolsrc/src/commands_edit.cpp
index a4981cf80..3297b5295 100644
--- a/toolsrc/src/commands_edit.cpp
+++ b/toolsrc/src/commands_edit.cpp
@@ -11,6 +11,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), "Could not find port named %s", port_name);
// Find editor
std::wstring env_EDITOR = System::wdupenv_str(L"EDITOR");