Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace http.Get with wget #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mateeullahmalik
Copy link
Contributor

@mateeullahmalik mateeullahmalik commented Oct 9, 2024

PR: Implement wget installation and usage for file downloads

Changes

This PR implements the installation and usage of wget for file downloads across different operating systems. It also refactors the existing download function to use wget instead of the previous implementation.

Key Updates:

  1. cmd/install.go:

    • Added a new function installWget(ctx context.Context) to handle wget installation across different operating systems (Linux, macOS, Windows).
    • For Windows, it includes a check for Chocolatey and installs it if not present.
    • The function is called before certain installation processes to ensure wget is available.
  2. utils/utils.go:

    • Refactored the DownloadFile function to use wget instead of the previous Go implementation.
    • Removed the custom progress reporting in favor of wget's built-in progress output.

Testing

The changes have been tested and verified on the following scenarios:

  • Install and update commands on Linux
  • Install and update commands on macOS
  • Install and update commands on Windows (with and without Chocolatey pre-installed)

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