MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / is_installed

Method is_installed

src/python/package_manager.cpp:488–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486 }
487
488 bool PackageManager::is_installed(const std::string& package) const {
489 const auto packages = list_installed();
490 auto normalize = [](std::string s) {
491 std::replace(s.begin(), s.end(), '-', '_');
492 return s;
493 };
494 const auto normalized = normalize(package);
495
496 for (const auto& pkg : packages) {
497 if (pkg.name == package || normalize(pkg.name) == normalized)
498 return true;
499 }
500 return false;
501 }
502
503 bool PackageManager::install_async(const std::string& package,
504 UvRunner::OutputCallback on_output,

Callers 6

start_debugpyFunction · 0.80
start_embedded_replFunction · 0.80
format_python_code_implFunction · 0.80
register_packagesFunction · 0.80

Calls 3

normalizeFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by 2