Skip to content

Commit d0b5ea6

Browse files
committed
Hide compile stats when using preprocess flag
1 parent bfc74be commit d0b5ea6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: internal/cli/compile/compile.go

+6
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
330330
ProfileOut: profileOut,
331331
Success: compileError == nil,
332332
showPropertiesMode: showProperties,
333+
hideStats: preprocess,
333334
}
334335

335336
if compileError != nil {
@@ -394,6 +395,7 @@ type compileResult struct {
394395
Error string `json:"error,omitempty"`
395396

396397
showPropertiesMode arguments.ShowPropertiesMode
398+
hideStats bool
397399
}
398400

399401
func (r *compileResult) Data() interface{} {
@@ -405,6 +407,10 @@ func (r *compileResult) String() string {
405407
return strings.Join(r.BuilderResult.GetBuildProperties(), fmt.Sprintln())
406408
}
407409

410+
if r.hideStats {
411+
return ""
412+
}
413+
408414
titleColor := color.New(color.FgHiGreen)
409415
nameColor := color.New(color.FgHiYellow)
410416
pathColor := color.New(color.FgHiBlack)

0 commit comments

Comments
 (0)