Skip to content

Refactor cli.py – Improve consistency and handle missing dependencies issue #12#65

Open
Diksha78-bot wants to merge 1 commit intoAdmGenSameer:mainfrom
Diksha78-bot:add-source-cli-flags
Open

Refactor cli.py – Improve consistency and handle missing dependencies issue #12#65
Diksha78-bot wants to merge 1 commit intoAdmGenSameer:mainfrom
Diksha78-bot:add-source-cli-flags

Conversation

@Diksha78-bot
Copy link

This PR refactors the cli.py file to improve overall consistency, error handling, and user experience. Key updates include:

Changes made:

Added detailed handling for missing distro dependency.

Improved Linux distribution detection with better warnings for unsupported or unknown distros.

Centralized search error handling for all package sources (AUR, Pacman, Flatpak, Snap, APT, DNF).

Enhanced package scoring algorithm for better top-match selection.

Added GitHub fallback when no packages are found.

Updated CLI output messages with clear instructions and panels for warnings/errors.

Testing performed:

Verified that running python cli.py works without crashing.

Tested on Windows (fallback to GitHub search works as expected).

Verified that missing dependencies (like distro) show proper error message and installation instructions.

Top matching packages display correctly with interactive installation flow (if supported).

Note for reviewers:

On Windows, system-specific package managers like Pacman/Flatpak are not available, so GitHub fallback is expected behavior.

All critical changes are within cli.py.

@Diksha78-bot Diksha78-bot changed the title Refactor cli.py – Improve consistency and handle missing dependencies(issue #12) Refactor cli.py – Improve consistency and handle missing dependencies issue #12 Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant