Skip to content

Commit

Permalink
fix(scanner_scan): sync logging before print output
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Jun 26, 2023
1 parent e83b8fd commit 7340caf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/murphy/internal/internalcmd/scanner_scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/spf13/cobra"
"os"
"path/filepath"
"time"
)

func scannerScanCmd() *cobra.Command {
Expand Down Expand Up @@ -77,6 +78,6 @@ func scannerScanRun(cmd *cobra.Command, args []string) {
ComponentCodeFragment: utils.NoNilSlice(scantask.CodeFragments),
ScannerShouldEnableMavenBackupScan: env.ScannerShouldEnableMavenBackupScan,
}
must.Must(logctx.Use(ctx).Sync())
time.Sleep(time.Second) // todo: workaround
fmt.Println(string(must.M1(json.MarshalIndent(w, "", " "))))
}

0 comments on commit 7340caf

Please sign in to comment.