Add Fedora setup option depending of which distro you are in #32
+60
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trying to install Valdi on my machine I got some problems trying to build, looking at the code I realized it was because I am using Fedora and the config was built to work with debian based distros.
This pull request add Linux distribution support in the CLI setup process, providing tailored installation commands and setup logic for both Ubuntu and Fedora systems. The changes improve the user experience by detecting the user's Linux distribution and running the appropriate dependency installation steps, rather than assuming all users are on Ubuntu. Additionally, the doctor command now gives more accurate instructions for resolving missing dependencies based on the detected distribution.
Linux distribution detection and setup:
linuxSetup.ts, and refactored the main setup logic to delegate to new, distro-specific setup functions (ubuntuSetupandfedoraSetup). If an unsupported distro is detected, a clear error message is shown.ubuntuSetup.tsandfedoraSetup.tsto encapsulate the installation steps for each distribution, including dependency installation and Java runtime checks.Improved dependency installation instructions:
ValdiDoctorclass to provide more accurate fix commands for missing dependencies, usingsudo apt-getfor Ubuntu,sudo dnffor Fedora, and a generic message for other distributions.isFedora,isUbuntu) into the doctor command for use in generating these instructions.If anyone have any other changes feel free to change.