Merge pull request #212 from revel/build_process_update

Updated verbose flag
This commit is contained in:
Brenden Soares
2022-04-12 08:40:27 -07:00
committed by GitHub
3 changed files with 12 additions and 3 deletions

View File

@@ -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. // Sets the versions on the command config.
func (c *CommandConfig) SetVersions() (err error) { func (c *CommandConfig) SetVersions() (err error) {
c.CommandVersion, _ = ParseVersion(cmd.Version) c.CommandVersion, _ = ParseVersion(cmd.Version)

View File

@@ -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 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) { if revelPath.Config.BoolDefault("watch", true) && revelPath.Config.BoolDefault("watch.code", true) {
utils.Logger.Info("Running in watched mode.") 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 { if c.HistoricMode {
runMode = revelPath.RunMode runMode = revelPath.RunMode
} }
@@ -152,7 +153,7 @@ func runApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 { if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap) 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 { if c.HistoricMode {
runMode = revelPath.RunMode runMode = revelPath.RunMode
} }

View File

@@ -112,7 +112,7 @@ func testApp(c *model.CommandConfig) (err error) {
if len(app.PackagePathMap) > 0 { if len(app.PackagePathMap) > 0 {
paths, _ = json.Marshal(app.PackagePathMap) 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 { if c.HistoricMode {
runMode = app.Paths.RunMode runMode = app.Paths.RunMode
} }