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

gpg-agent: fix usage of splitString #5405

Merged
merged 1 commit into from
May 28, 2024

Conversation

SharzyL
Copy link
Contributor

@SharzyL SharzyL commented May 14, 2024

Description

splitString "" "some string" would throw exception error: invalid regular expression on Darwin (or accurately, on Nix built against libc++). Refer to NixOS/nix#7208 for details.

Before Nix handles that issue correctly, we should refrain from using splitString "", and luckliy lib.stringAsChars can do the same thing.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@rycee

`splitString "" "some string"` would throw exception `error: invalid
regular expression` on Darwin (or accurately, on Nix built against
libc++). Refer to NixOS/nix#7208 for
details.

Before Nix handles that issue correctly, we should refrain from using
`splitString ""`, and luckliy `lib.stringAsChars` can do the same thing.
@rycee rycee merged commit a9b36cb into nix-community:master May 28, 2024
2 of 3 checks passed
@rycee
Copy link
Member

rycee commented May 28, 2024

Thanks! Merged to master now 🙂

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.

None yet

2 participants