Update git/client.go

Co-authored-by: Sam Coe <samcoe@users.noreply.github.com>
This commit is contained in:
Nate Smith 2022-12-14 16:15:37 -08:00 committed by GitHub
parent 230d89be93
commit 941dc26cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -507,11 +507,16 @@ func (c *Client) InGitDirectory(ctx context.Context) bool {
}
func (c *Client) UnsetRemoteResolution(ctx context.Context, name string) error {
unsetCmd, err := c.Command(ctx, "config", "--unset", fmt.Sprintf("remote.%s.gh-resolved", name))
args := []string{"config", "--unset", fmt.Sprintf("remote.%s.gh-resolved", name)}
cmd, err := c.Command(ctx, args...)
if err != nil {
return err
}
return unsetCmd.Run()
_, err = cmd.Output()
if err != nil {
return err
}
return nil
}
func resolveGitPath() (string, error) {