Skip to content

Commit 314f7d6

Browse files
committed
Hide compile stats when using preprocess flag
1 parent 4492683 commit 314f7d6

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
@@ -356,6 +356,7 @@ func runCompileCommand(cmd *cobra.Command, args []string) {
356356
ProfileOut: profileOut,
357357
Success: compileError == nil,
358358
showPropertiesMode: showPropertiesM,
359+
hideStats: preprocess,
359360
}
360361

361362
if compileError != nil {
@@ -417,6 +418,7 @@ type compileResult struct {
417418
Error string `json:"error,omitempty"`
418419

419420
showPropertiesMode showPropertiesMode
421+
hideStats bool
420422
}
421423

422424
func (r *compileResult) Data() interface{} {
@@ -428,6 +430,10 @@ func (r *compileResult) String() string {
428430
return strings.Join(r.BuilderResult.GetBuildProperties(), fmt.Sprintln())
429431
}
430432

433+
if r.hideStats {
434+
return ""
435+
}
436+
431437
titleColor := color.New(color.FgHiGreen)
432438
nameColor := color.New(color.FgHiYellow)
433439
pathColor := color.New(color.FgHiBlack)

0 commit comments

Comments
 (0)