-
Notifications
You must be signed in to change notification settings - Fork 24
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/537/detect region from git remote #724
Conversation
0b85353
to
2f23272
Compare
|
||
"github.com/Scalingo/cli/config" | ||
"github.com/Scalingo/cli/utils" | ||
|
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.
Are you sure your IDE is correctly configured?
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.
I will fix that and have a look at my linter configuration.
"gopkg.in/errgo.v1" | ||
|
||
"github.com/Scalingo/cli/utils" | ||
|
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.
if dir, ok := utils.DetectGit(); ok { | ||
remotes, err := utils.ScalingoGitRemotes(dir) | ||
if err != nil { | ||
debug.Println(err) |
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.
Why are the errors not returned and directly printed in a debug log? This is not the choice made for apps (cf. GetAppNameFromGitRemote
).
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.
It's the same for the app part (CurrentApp
), at first, this error was simply ignored, @johnsudaar thought it could be convenient to print it in a debug log. It's not a blocking error, we do not want to make anything out of it. We simply return an empty string and the --region
flag is use instead.
Fix #537
Detect region from current git remote
appdetect
package has been replaced bydetect
which handles app and region detectionGit related methods have been moved in the
utils
packageAdd a changelog entry in the section "To Be Released" of CHANGELOG.md