[edit command] Now checks that port exists before opening

This commit is contained in:
Alexander Karatarakis 2017-01-13 02:09:08 -08:00
parent cc8851144a
commit fe2c0a3a78
1 changed files with 1 additions and 0 deletions

View File

@ -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");