Skip to content

Commit

Permalink
Merge pull request #212 from revel/build_process_update
Browse files Browse the repository at this point in the history
Updated verbose flag
  • Loading branch information
brendensoares committed Apr 12, 2022
2 parents da2a81d + 1cdd318 commit 0ec9e69
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions model/command_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,14 @@ func (c *CommandConfig) initGoPaths() {
*/
}

// Sets the versions on the command config.
func (c *CommandConfig) GetVerbose() (verbose bool) {
if len(c.Verbose) > 0 {
verbose = c.Verbose[0]
}
return
}

// Sets the versions on the command config.
func (c *CommandConfig) SetVersions() (err error) {
c.CommandVersion, _ = ParseVersion(cmd.Version)
Expand Down
5 changes: 3 additions & 2 deletions revel/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ func runApp(c *model.CommandConfig) (err error) {
// If the app is run in "watched" mode, use the harness to run it.
if revelPath.Config.BoolDefault("watch", true) && revelPath.Config.BoolDefault("watch.code", true) {
utils.Logger.Info("Running in watched mode.")
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.Verbose[0])

runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.GetVerbose())
if c.HistoricMode {
runMode = revelPath.RunMode
}
Expand All @@ -152,7 +153,7 @@ func runApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap)
}
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.GetVerbose(), string(paths))
if c.HistoricMode {
runMode = revelPath.RunMode
}
Expand Down
2 changes: 1 addition & 1 deletion revel/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func testApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap)
}
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.GetVerbose(), string(paths))
if c.HistoricMode {
runMode = app.Paths.RunMode
}
Expand Down

0 comments on commit 0ec9e69

Please sign in to comment.