mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-19 03:13:03 +08:00
[vcpkg-export] Fix nuget export. Fixes #1223.
This commit is contained in:
parent
a9baf1d5ac
commit
8461bc1913
@ -122,6 +122,10 @@ namespace vcpkg::Commands::Export
|
||||
const std::string targets_redirect_content =
|
||||
create_targets_redirect("../../scripts/buildsystems/msbuild/vcpkg.targets");
|
||||
const fs::path targets_redirect = paths.buildsystems / "tmp" / "vcpkg.export.nuget.targets";
|
||||
|
||||
std::error_code ec;
|
||||
fs.create_directories(paths.buildsystems / "tmp", ec);
|
||||
|
||||
fs.write_contents(targets_redirect, targets_redirect_content);
|
||||
|
||||
const std::string nuspec_file_content =
|
||||
|
@ -164,7 +164,8 @@ namespace vcpkg::Files
|
||||
{
|
||||
FILE* f = nullptr;
|
||||
auto ec = _wfopen_s(&f, file_path.native().c_str(), L"wb");
|
||||
Checks::check_exit(VCPKG_LINE_INFO, ec == 0);
|
||||
Checks::check_exit(
|
||||
VCPKG_LINE_INFO, ec == 0, "Error: Could not open file for writing: %s", file_path.u8string().c_str());
|
||||
auto count = fwrite(data.data(), sizeof(data[0]), data.size(), f);
|
||||
fclose(f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user