diff options
| author | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2017-09-28 01:00:40 +0300 |
|---|---|---|
| committer | Konstantin Podsvirov <konstantin@podsvirov.pro> | 2017-09-28 01:00:40 +0300 |
| commit | d25fd5c7b3b0f21581dd9c44a915c9156683877a (patch) | |
| tree | 075aa03200585351d4a857695af00ee8a1539580 /toolsrc/src | |
| parent | c6149fae2f9f33d9ed363650aee6aea642574b0a (diff) | |
| download | vcpkg-d25fd5c7b3b0f21581dd9c44a915c9156683877a.tar.gz vcpkg-d25fd5c7b3b0f21581dd9c44a915c9156683877a.zip | |
[vcpkg-export-ifw] Some improvements
Improvements:
- fix typos;
- remove outdated repository directory.
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/commands_export_ifw.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/toolsrc/src/commands_export_ifw.cpp b/toolsrc/src/commands_export_ifw.cpp index d1428f5d1..a0692c11e 100644 --- a/toolsrc/src/commands_export_ifw.cpp +++ b/toolsrc/src/commands_export_ifw.cpp @@ -35,7 +35,7 @@ namespace vcpkg::Commands::Export::IFW fs::path get_repository_dir_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_packages_dir_path.has_value() ? + return ifw_options.maybe_repository_dir_path.has_value() ? fs::path(ifw_options.maybe_repository_dir_path.value_or_exit(VCPKG_LINE_INFO)) : paths.root / (export_id + "-ifw-repository"); } @@ -49,7 +49,7 @@ namespace vcpkg::Commands::Export::IFW fs::path get_installer_file_path(const std::string &export_id, const Options &ifw_options, const VcpkgPaths& paths) { - return ifw_options.maybe_config_file_path.has_value() ? + return ifw_options.maybe_installer_file_path.has_value() ? fs::path(ifw_options.maybe_installer_file_path.value_or_exit(VCPKG_LINE_INFO)) : paths.root / (export_id + "-ifw-installer.exe"); } @@ -279,6 +279,15 @@ R"###(<?xml version="1.0"?> System::println("Generating repository %s...", repository_dir.generic_string()); + std::error_code ec; + Files::Filesystem& fs = paths.get_filesystem(); + + fs.remove_all(repository_dir, ec); + Checks::check_exit(VCPKG_LINE_INFO, + !ec, + "Could not remove outdated repository directory %s", + repository_dir.generic_string()); + const std::wstring cmd_line = Strings::wformat(LR"("%s" --packages "%s" "%s" > nul)", repogen_exe.native(), |
