Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: device_info_plus on Linux keeps the single quotes from os-release (Gentoo)

未关闭
#4,011 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@ChandraChaan 已经在做这个了。

开始于 2026年10月27日。

  • #4012 来自 @ChandraChaan —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
dart, flutter
领域
backend

调研方向

Read device_info_plus_linux.dart, focusing on _Unquote.unquote(), and inspect the existing Linux tests for os-release parsing. Reproduce with single-quoted values such as ID='gentoo', then verify the reported id, name, and prettyName match the unquoted expected values. An open linked pull request already addresses this issue.

由索引模型根据 Issue 内容生成。

描述

Platform: Linux · Plugin: device_info_plus · Version: 13.3.0 (also current main)

Steps to reproduce
  1. Run an app on Gentoo (or any distro whose /etc/os-release uses single quotes). Gentoo's file now looks like this:
    NAME='Gentoo'
    ID='gentoo'
    PRETTY_NAME='Gentoo Linux'
    VERSION='2.18'
    VERSION_ID='2.18'
    
  2. Call DeviceInfoPlugin().linuxInfo.

Expected: id == 'gentoo', name == 'Gentoo', prettyName == 'Gentoo Linux'.

Actual: the quotes are kept: id == "'gentoo'", name == "'Gentoo'", prettyName == "'Gentoo Linux'", so a check like info.id == 'gentoo' is false.

Cause: _Unquote.unquote() in device_info_plus_linux.dart strips only double quotes. os-release(5) allows values in double or single quotes, and Gentoo switched to single quotes this year (Ansible and Facter both had to patch their parsers for it).

主要语言
Dart
星标
1.9k
派生
1.3k
平均合并
8 小时 43 分钟
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluttercommunity/plus_plugins 的其他 Issue

查看 fluttercommunity/plus_plugins 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。