(info)
| 272 | |
| 273 | |
| 274 | def shortcuts_flags(info) -> str: |
| 275 | menu_packages = info.get("menu_packages") |
| 276 | if menu_packages is None: |
| 277 | # not set: we create all shortcuts (default behaviour) |
| 278 | return "" |
| 279 | if menu_packages: |
| 280 | if info.get("_conda_exe_type") == StandaloneExe.MAMBA: |
| 281 | logger.warning( |
| 282 | "Micromamba does not support '--shortcuts-only'. Will install all shortcuts." |
| 283 | ) |
| 284 | return "" |
| 285 | # set and populated: we only create shortcuts for some |
| 286 | # NOTE: This syntax requires conda 23.11 or above |
| 287 | return " ".join([f"--shortcuts-only={pkg.strip()}" for pkg in menu_packages]) |
| 288 | # set but empty: disable all shortcuts |
| 289 | return "--no-shortcuts" |
| 290 | |
| 291 | |
| 292 | def approx_size_kb(info, which="pkgs"): |
no test coverage detected