Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#4,011 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ChandraChaan đang làm issue này rồi.

Từ ngày 27/10/2026.

  • #4012 của @ChandraChaan — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
dart, flutter
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Dart
Star
1.9k
Fork
1.3k
Merge trung bình
8 giờ 43 phút
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fluttercommunity/plus_plugins

Tất cả issue của fluttercommunity/plus_plugins

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.