Skip to content

Commit

Permalink
[1.x] Ignore SOLV writing exceptions (#3313)
Browse files Browse the repository at this point in the history
* catch solv writing exceptions

* Apply suggestion

Co-authored-by: Hind-M <[email protected]>

* Fix linter

---------

Co-authored-by: Hind-M <[email protected]>
Co-authored-by: Hind Montassif <[email protected]>
  • Loading branch information
3 people authored Oct 10, 2024
1 parent e10e643 commit dd995ae
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion libmamba/src/core/repo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <array>
#include <exception>
#include <tuple>

#include <nlohmann/json.hpp>
Expand Down Expand Up @@ -329,7 +330,15 @@ namespace mamba

if (name() != "installed")
{
write_solv(solv_file);
try
{
write_solv(solv_file);
}
catch (const std::exception& e)
{
LOG_WARNING << "Could not write libsolv solv file for " << json_file << ": "
<< e.what();
}
}
}

Expand Down

0 comments on commit dd995ae

Please sign in to comment.