minor fix
This commit is contained in:
parent
b106e606e1
commit
c1c2946179
2 changed files with 4 additions and 4 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue