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

Properly swallow errors if deleting a remote fails #505

Merged
merged 2 commits into from
Sep 8, 2024

Commits on Aug 19, 2024

  1. Properly swallow errors if deleting a remote fails

    `deleteRemote()` intends to return successfully if
    the to-be-deleted remote does not exist. In this case, git returns an
    exit code of 2, and outputs a message to stderr. Depending on the locale
    of the user's system, this error message might be localized.
    `spawnPromise()` and `spawnStream()` try to set the locale to `en_US`,
    but there are no guarantees that this locale is actually available on
    the user's system.
    
    Instead of doing fragile locale-dependent string parsing, simply use the
    exit code we get from git in this case and act on that.
    
    Fix the mocks in the tests to behave like the real-world git, and add a
    test for the non-English case as well.
    imphil committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    ebb7b9b View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2024

  1. Configuration menu
    Copy the full SHA
    f5619a8 View commit details
    Browse the repository at this point in the history