From 690563edbbe481761943739ef0910bcb4e3e0afe Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 9 Jan 2025 11:56:01 +0100 Subject: [PATCH 1/2] fix: Add a hint on cache corruption Signed-off-by: Julien Jerphanion --- libmamba/src/core/error_handling.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libmamba/src/core/error_handling.cpp b/libmamba/src/core/error_handling.cpp index a779da6c00..fbaef5db1f 100644 --- a/libmamba/src/core/error_handling.cpp +++ b/libmamba/src/core/error_handling.cpp @@ -76,6 +76,12 @@ namespace mamba m_aggregated_message += er.what(); m_aggregated_message += "\n"; } + + m_aggregated_message += "If you run into this error repeatedly, your package cache may be corrupted.\n"; + m_aggregated_message += "Please try running `mamba clean -a` to remove this cache before retrying the operation.\n"; + m_aggregated_message += "\n"; + m_aggregated_message += "If you still are having issues, please report the error on `mamba-org/mamba`'s issue tracker:\n"; + m_aggregated_message += "https://github.com/mamba-org/mamba/issues/new?assignees=&labels=&projects=&template=bug.yml"; } return m_aggregated_message.c_str(); } From 593677e4773800a70136481946b38923e5a49c5b Mon Sep 17 00:00:00 2001 From: Julien Jerphanion Date: Thu, 9 Jan 2025 16:42:42 +0100 Subject: [PATCH 2/2] Only add one string Signed-off-by: Julien Jerphanion Co-authored-by: Klaim --- libmamba/src/core/error_handling.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libmamba/src/core/error_handling.cpp b/libmamba/src/core/error_handling.cpp index fbaef5db1f..ad328c7463 100644 --- a/libmamba/src/core/error_handling.cpp +++ b/libmamba/src/core/error_handling.cpp @@ -77,11 +77,11 @@ namespace mamba m_aggregated_message += "\n"; } - m_aggregated_message += "If you run into this error repeatedly, your package cache may be corrupted.\n"; - m_aggregated_message += "Please try running `mamba clean -a` to remove this cache before retrying the operation.\n"; - m_aggregated_message += "\n"; - m_aggregated_message += "If you still are having issues, please report the error on `mamba-org/mamba`'s issue tracker:\n"; - m_aggregated_message += "https://github.com/mamba-org/mamba/issues/new?assignees=&labels=&projects=&template=bug.yml"; + m_aggregated_message += "If you run into this error repeatedly, your package cache may be corrupted.\n" + "Please try running `mamba clean -a` to remove this cache before retrying the operation.\n" + "\n" + "If you still are having issues, please report the error on `mamba-org/mamba`'s issue tracker:\n" + "https://github.com/mamba-org/mamba/issues/new?assignees=&labels=&projects=&template=bug.yml"; } return m_aggregated_message.c_str(); }