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
Fix/cli/525/git setup remote already exists #527
Conversation
cmd/git.go
Outdated
@@ -29,7 +32,8 @@ var ( | |||
} | |||
|
|||
err := git.Setup(appdetect.CurrentApp(c), git.SetupParams{ | |||
RemoteName: c.String("r"), | |||
RemoteName: c.String("r"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the long flag name for a better readability
git/setup.go
Outdated
errWrapped := utils.WrapError(err, "fail to create the Git remote") | ||
if err == git.ErrRemoteExists { | ||
errWrapped = utils.WrapError(err, "fail to create the Git remote"+ | ||
" (maybe you want use the force option to override the remote url)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail to configure git repository, "%v" remote already exists. (Use --force option to override)
Actually something is still missing here, usually when we modify the CLI behavior, we add in the PR a console output showing the new feature/fix. Could you please add that?
As spoken orally, the error displayed to the user is not right (repetition), to make it cleaner, it requires some changes in way we're handling error and probably to modify https://github.com/Scalingo/go-scalingo/errors |
After disucssion, we accept this version, better error management will be handled later |
Offer a option --force to the command git-setup to allow the user to override the current remote handle with a new remote url
Fix #525
User
Tech