This pull request includes a set of optimizations and refactorings to the Falcon Linux installer script, improving both its efficiency and maintainability.
Changes introduced:
API Request URL Update: The API request URL was updated to include a version sorting parameter. This allows us to handle the versioning in a simpler way, reducing the complexity of the code.
Installer Detection Logic Refactoring: The installer detection logic was refactored to reduce its complexity. This change simplifies the code and makes it more readable and maintainable.
Descriptive Error Messages: The error messages were adjusted to be more descriptive and specific. This helps in better identifying the issues when errors occur.
Amazon Linux Version Handling: The handling of Amazon Linux versions was revamped. The new code correctly identifies Amazon Linux 1 versions (i.e., 2018.03, 2017.09, etc.) and differentiates them from Amazon Linux 2 and newer versions.
This refactoring not only simplifies the code, but also makes it more resilient to potential issues in the future. Please review and provide your feedback.
Fixes #179
This pull request includes a set of optimizations and refactorings to the Falcon Linux installer script, improving both its efficiency and maintainability.
Changes introduced:
API Request URL Update: The API request URL was updated to include a version sorting parameter. This allows us to handle the versioning in a simpler way, reducing the complexity of the code.
Installer Detection Logic Refactoring: The installer detection logic was refactored to reduce its complexity. This change simplifies the code and makes it more readable and maintainable.
Descriptive Error Messages: The error messages were adjusted to be more descriptive and specific. This helps in better identifying the issues when errors occur.
Amazon Linux Version Handling: The handling of Amazon Linux versions was revamped. The new code correctly identifies Amazon Linux 1 versions (i.e., 2018.03, 2017.09, etc.) and differentiates them from Amazon Linux 2 and newer versions.
This refactoring not only simplifies the code, but also makes it more resilient to potential issues in the future. Please review and provide your feedback.