提交 8b5fa4ac 编写于 作者: A Andreas Baumann

checking for err being null before printing 403 message

上级 12bf1c29
......@@ -97,7 +97,7 @@ func delete(command *Command, args *Args) {
}
err = gh.DeleteRepository(project)
if strings.Contains(err.Error(), "HTTP 403") {
if err != nil && strings.Contains(err.Error(), "HTTP 403") {
fmt.Println("Please edit the token used for hub at https://github.com/settings/tokens\nand verify that the `delete_repo` scope is enabled.\n")
}
utils.Check(err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册