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

[F] Do not read debian_version on Ubuntu #195

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

catumin
Copy link
Collaborator

@catumin catumin commented Sep 29, 2023

Description

Fix the issue I introduced in #191 that caused Ubuntu to read the debian_version file.

@catumin
Copy link
Collaborator Author

catumin commented Sep 29, 2023

Oh I'm silly, one sec.

@catumin catumin merged commit 20e9368 into hykilpikonna:master Sep 29, 2023
1 check passed
hykilpikonna added a commit that referenced this pull request Dec 19, 2023
hykilpikonna added a commit that referenced this pull request Dec 19, 2023
@hykilpikonna
Copy link
Owner

Hmm ok this problem seems to be more complex, since we need to check the distro in a function that tries to obtain the distro to begin with. In this line, $distro_shorthand is either "on", "tiny", or "*", and $distro is not assigned yet.

so I used $(lsb_release -si) to check for the distro instead.

if [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]]; then
image

@hykilpikonna
Copy link
Owner

Also, would it be better to check if the distro is Debian instead of if the distro isn't Ubuntu here?

@catumin
Copy link
Collaborator Author

catumin commented Dec 19, 2023

I'm trying to remember my reasoning for checking that it's not Ubuntu vs checking that it's specifically Debian, and can't come up with anything at the moment. I think it would be better to check if it's specifically Debian.

@catumin catumin deleted the debian-version branch May 26, 2024 22:08
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