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

Method uv_path

src/python/package_manager.cpp:252–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250 }
251
252 std::filesystem::path PackageManager::uv_path() const {
253 static std::filesystem::path cached;
254 static bool searched = false;
255
256 if (searched)
257 return cached;
258 searched = true;
259
260 const auto exe_dir = get_executable_dir();
261 bool bundled = false;
262
263 if (const auto p = exe_dir / "bin" / UV_BINARY; std::filesystem::exists(p)) {
264 cached = p;
265 bundled = true;
266 } else if (const auto p = exe_dir / UV_BINARY; std::filesystem::exists(p)) {
267 cached = p;
268 bundled = true;
269 }
270
271 if (cached.empty())
272 LOG_WARN("Bundled uv not found");
273 else if (bundled)
274 LOG_INFO("Using bundled uv: {}", lfs::core::path_to_utf8(cached));
275
276 return cached;
277 }
278
279 bool PackageManager::is_uv_available() const {
280 return !uv_path().empty();

Callers 4

run_plugin_commandFunction · 0.80
startMethod · 0.80
register_packagesFunction · 0.80

Calls 3

get_executable_dirFunction · 0.85
path_to_utf8Function · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected