You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(device_info_plus): handle single-quoted values in os-release on Linux - #4012
The Linux implementation reads /etc/os-release and strips quotes from each value, but only double quotes. The os-release format allows values in single quotes too, and Gentoo now writes its file that way (NAME='Gentoo', ID='gentoo', ...). So on Gentoo linuxInfo.id is 'gentoo' with the quotes included, and checks like id == 'gentoo' fail.
unquote() now strips single quotes when the value starts with one, and otherwise behaves as before. Double-quoted and unquoted values are unchanged.
Added a test that uses Gentoo's actual os-release contents.
The ios_integration_test job was cancelled at the 30-minute limit while the integration tests were still running, before any result. This change only touches the Linux os-release parsing in device_info_plus; every other job passes, including linux_integration_test and ios_example_build. The same job was also cancelled on other recent device_info_plus PRs. Could a maintainer re-run it?
Hi maintainers, a gentle ping on this one. It fixes #4011 by stripping single quotes from os-release values on Linux (Gentoo now writes them that way), with a test using Gentoo's real file. Every check passes except ios_integration_test, which was cancelled at the 30-minute limit. Could someone re-run that job and take a look? Thanks!
Friendly follow-up: everything passes except ios_integration_test, which was cancelled at the 30-minute limit and doesn't touch this Linux-only os-release change. Could a maintainer re-run it and review? It fixes #4011. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Description
The Linux implementation reads
/etc/os-releaseand strips quotes from each value, but only double quotes. The os-release format allows values in single quotes too, and Gentoo now writes its file that way (NAME='Gentoo',ID='gentoo', ...). So on GentoolinuxInfo.idis'gentoo'with the quotes included, and checks likeid == 'gentoo'fail.unquote()now strips single quotes when the value starts with one, and otherwise behaves as before. Double-quoted and unquoted values are unchanged.Added a test that uses Gentoo's actual
os-releasecontents.Related Issues
Checklist
CHANGELOG.mdnor the plugin version inpubspec.yamlfiles.flutter analyze) does not report any problems on my PR.Breaking Change