-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
fix run web with -p push failed #3154
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3154 +/- ##
==========================================
- Coverage 34.77% 34.71% -0.07%
==========================================
Files 276 276
Lines 39946 39970 +24
==========================================
- Hits 13893 13874 -19
- Misses 24057 24100 +43
Partials 1996 1996
Continue to review full report at Codecov.
|
@@ -69,6 +71,34 @@ func runWeb(ctx *cli.Context) error { | |||
if ctx.IsSet("port") { | |||
setting.AppURL = strings.Replace(setting.AppURL, setting.HTTPPort, ctx.String("port"), 1) | |||
setting.HTTPPort = ctx.String("port") | |||
|
|||
switch setting.Protocol { | |||
case setting.UnixSocket: |
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.
This will not work for unix sockets and FCGI (see NewContext
in setting.go
).
As being so close to that functionality as in NewContext, can this formatting be moved out to some common place so that it could be reused in both places?
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.
@lafriks, for unix sockets and FCGI, the port changed will not be effected, so ignored them. Currently only this place need the code and there is no other place need it.
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.
Sorry it was late and forgot about golang cases not being fall through by default :)
LGTM |
Trusted LGTM |
Will fix #2952