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

Fix parsing of "ubuntu-drivers list --recommended" output #321

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

jlnr
Copy link
Contributor

@jlnr jlnr commented Sep 8, 2023

Follow-up to #320, based on discussion here elementary/os#686 (comment)

"ubuntu-drivers" uses different separators when passing the "--recommended" flag, so the current split(",") breaks when more than one package name is being returned. This PR adjusts the code so that multi-package and multi-line output can both be parsed correctly.

This command uses different separators when passing the "--recommended" flag. This adjusts the code so that multi-package and multi-line output can both be parsed correctly.
Copy link
Contributor Author

@jlnr jlnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one trim() call to avoid errors when parsing the "%s %s" format when one string is empty.

src/installer/steps/configure/chroot_conf.rs Outdated Show resolved Hide resolved
@leviport leviport requested review from a team September 8, 2023 14:38
@jacobgkau jacobgkau self-assigned this Sep 8, 2023
Copy link
Member

@jacobgkau jacobgkau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still no regressions on Pop!_OS. The latest change makes sense.

@jacobgkau jacobgkau merged commit 30a96be into pop-os:master Sep 8, 2023
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.

3 participants