Skip to content

Hard coded string caused crash in non-English locale #51

@hongwen000

Description

@hongwen000

In src/HandyWinget/Common/Helper.cs, line 314; "Name" string is hard coded, however, winget process does not always return "Name" as the header. Instead, its output depends on locale.

            try
            {
                string input = _wingetData.Substring(_wingetData.IndexOf("Name"));
                var lines = input.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).Skip(2);
                return lines;

            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions