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

Avoid an infinite loop on unknown Linux distributions #63

Merged
merged 1 commit into from
Apr 25, 2021
Merged

Avoid an infinite loop on unknown Linux distributions #63

merged 1 commit into from
Apr 25, 2021

Conversation

cspiegel
Copy link
Contributor

The code to handle Linux looks something like this:

while (1)
if is Alpine Linux
break
else if is Arch Linux
break

The problem is that if no distribution matches, the loop will not end.
This just removes the loop, while adding a default "unsupported" ASCII
art and package count. As a result, I've also removed the "else" block
that catches unsupported operating systems since it will use the same
defeault image that unknown Linux distributions now use.

The code to handle Linux looks something like this:

while (1)
    if is Alpine Linux
        break
    else if is Arch Linux
        break

The problem is that if no distribution matches, the loop will not end.
This just removes the loop, while adding a default "unsupported" ASCII
art and package count. As a result, I've also removed the "else" block
that catches unsupported operating systems since it will use the same
defeault image that unknown Linux distributions now use.
@13-CF 13-CF merged commit 5bd25ab into 13-CF:master Apr 25, 2021
@cspiegel cspiegel deleted the fix-infinite-loop branch April 26, 2021 04:40
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.

2 participants