Skip to content

Commit

Permalink
Merge pull request #213 from revel/hotfix/v1.1.0
Browse files Browse the repository at this point in the history
Fixed run mode for verbose
  • Loading branch information
brendensoares committed Apr 12, 2022
2 parents 0ec9e69 + 55b736e commit d83d2d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions harness/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func NewHarness(c *model.CommandConfig, paths *model.RevelContainer, runMode str
// Refresh method rebuilds the Revel application and run it on the given port.
// called by the watcher.
func (h *Harness) Refresh() (err *utils.SourceError) {
t := time.Now();
t := time.Now()
fmt.Println("Change detected, recompiling")
err = h.refresh()
if err != nil && !h.ranOnce && h.useProxy {
Expand Down Expand Up @@ -265,8 +265,8 @@ func (h *Harness) refresh() (err *utils.SourceError) {
if len(h.app.PackagePathMap) > 0 {
paths, _ = json.Marshal(h.app.PackagePathMap)
}
runMode = fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, h.app.Paths.RunMode, h.config.Verbose[0], string(paths))

runMode = fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, h.app.Paths.RunMode, h.config.GetVerbose(), string(paths))
}

if err2 := h.app.Cmd(runMode).Start(h.config); err2 != nil {
Expand Down Expand Up @@ -312,7 +312,7 @@ func (h *Harness) Run() {
paths = append(paths, h.paths.CodePaths...)
h.watcher = watcher.NewWatcher(h.paths, false)
h.watcher.Listen(h, paths...)

go func() {
if err := h.Refresh(); err != nil {
utils.Logger.Error("Failed to refresh", "error", err)
Expand Down

0 comments on commit d83d2d5

Please sign in to comment.