minor fix

This commit is contained in:
Parth Patel 2021-10-13 15:04:43 -04:00
parent b106e606e1
commit c1c2946179
2 changed files with 4 additions and 4 deletions

View file

@ -86,7 +86,7 @@ func renameRun(opts *RenameOptions) error {
err = runRename(apiClient, repo.RepoHost(), input)
if err != nil {
return fmt.Errorf("API called failed: %s, please check your parameters", err.Error())
return fmt.Errorf("API called failed: %s, please check your parameters", err)
}
if opts.IO.IsStdoutTTY() {

View file

@ -94,13 +94,13 @@ func TestRenameRun(t *testing.T) {
{
name: "owner repo change name notty",
opts: RenameOptions{
oldRepoName: "NON_OWNER/REPO",
oldRepoName: "OWNER/REPO",
newRepoName: "NEW_REPO",
},
httpStubs: func(reg *httpmock.Registry) {
reg.Register(
httpmock.REST("PATCH", "repos/NON_OWNER/REPO"),
httpmock.StatusStringResponse(200, "{}"))
httpmock.REST("PATCH", "repos/OWNER/REPO"),
httpmock.StatusStringResponse(204, "{}"))
},
stdoutTTY: false,
},