Created
March 12, 2015 03:27
-
-
Save kaneshin/a2228fb8035dec95e53c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/revel/run.go b/revel/run.go | |
| index 0edc673..966bedf 100644 | |
| --- a/revel/run.go | |
| +++ b/revel/run.go | |
| @@ -47,13 +47,20 @@ func runApp(args []string) { | |
| // Determine the override port, if any. | |
| port := revel.HttpPort | |
| - if len(args) == 3 { | |
| + if len(args) >= 3 { | |
| var err error | |
| if port, err = strconv.Atoi(args[2]); err != nil { | |
| errorf("Failed to parse port as integer: %s", args[2]) | |
| } | |
| } | |
| + custom := true | |
| + if len(args) >= 4 { | |
| + if args[3] == "false" { | |
| + custom = false | |
| + } | |
| + } | |
| + | |
| revel.INFO.Printf("Running %s (%s) in %s mode\n", revel.AppName, revel.ImportPath, mode) | |
| revel.TRACE.Println("Base path:", revel.BasePath) | |
| @@ -64,7 +71,7 @@ func runApp(args []string) { | |
| } | |
| // Else, just build and run the app. | |
| - app, err := harness.Build() | |
| + app, err := harness.CustomBuild(custom) | |
| if err != nil { | |
| errorf("Failed to build app: %s", err) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment