Call init_console in mamba to prevent UTF8 errors when extracting pac… (#2657)

Call init_console in mamba to prevent UTF8 errors when extracting packages
This commit is contained in:
Johan Mabille 2023-07-05 22:26:40 +02:00 committed by GitHub
parent 9de2535cbb
commit cd1119fc41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -120,6 +120,7 @@ __all__ = [
"generate_ed25519_keypair",
"get_channels",
"get_virtual_packages",
"init_console",
"ostream_redirect",
"sign",
"simplify_conflicts",
@ -1593,6 +1594,9 @@ def get_channels(arg0: typing.List[str]) -> typing.List[Channel]:
def get_virtual_packages() -> typing.List[PackageInfo]:
pass
def init_console() -> None:
pass
def sign(data: str, secret_key: str) -> str:
pass

View File

@ -30,6 +30,7 @@
#include "mamba/core/subdirdata.hpp"
#include "mamba/core/transaction.hpp"
#include "mamba/core/url.hpp"
#include "mamba/core/util_os.hpp"
#include "mamba/core/util_string.hpp"
#include "mamba/core/validate.hpp"
#include "mamba/core/virtual_packages.hpp"
@ -1004,6 +1005,8 @@ PYBIND11_MODULE(bindings, m)
py::arg("compression_threads") = 1
);
m.def("init_console", &init_console);
// fix extract from error_handling first
// auto package_handling_sm = m.def_submodule("package_handling");
// package_handling_sm.def("extract", &extract);

View File

@ -226,6 +226,8 @@ def install(args, parser, command="install"):
context.validate_configuration()
check_non_admin()
api.init_console()
init_api_context(use_mamba_experimental)
newenv = bool(command == "create")