From fe014252c9b5da8183528ea98d73c654358e6ac7 Mon Sep 17 00:00:00 2001 From: Omer Zidkoni <50792403+omerzi@users.noreply.github.com> Date: Thu, 23 Jun 2022 12:24:25 +0300 Subject: [PATCH] Execute audit command with progress bar (#1569) * Execute audit command with progress bar --- go.mod | 4 ++-- go.sum | 8 ++++---- scan/cli.go | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index b9af26942..4b916248c 100644 --- a/go.mod +++ b/go.mod @@ -92,8 +92,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.3.1-0.20220620130614-83dda95caddf +replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.3.1-0.20220623084021-a61432b84f63 replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.14.1-0.20220621123826-1e21b88b991f -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220621124242-4fe813879da6 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220623085425-26d8ddbd18ef diff --git a/go.sum b/go.sum index 920b4eefe..f9ee549c6 100644 --- a/go.sum +++ b/go.sum @@ -440,12 +440,12 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i github.com/jedib0t/go-pretty/v6 v6.3.2 h1:+46BKrPFAyhAn3MTT3vzvZc+qvWAX23yviAlBG9zAxA= github.com/jedib0t/go-pretty/v6 v6.3.2/go.mod h1:B1WBBWnJhW9jnk7GHxY+p9NlmNwf/KUb4hKsRk6BdBQ= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jfrog/build-info-go v1.3.1-0.20220620130614-83dda95caddf h1:LprYKtz11FL8WmNBwaGPHfSPcFTrR3UkWVUEcDmh2GQ= -github.com/jfrog/build-info-go v1.3.1-0.20220620130614-83dda95caddf/go.mod h1:S2x0YOFBqBYp22goGRXGfy3ut7XaespgroVJpD6fPwk= +github.com/jfrog/build-info-go v1.3.1-0.20220623084021-a61432b84f63 h1:q4vngc6HMcDpOggrCTuYnRzp/zG76d6M7OiKdn1v1A8= +github.com/jfrog/build-info-go v1.3.1-0.20220623084021-a61432b84f63/go.mod h1:S2x0YOFBqBYp22goGRXGfy3ut7XaespgroVJpD6fPwk= github.com/jfrog/gofrog v1.1.2 h1:txts7zSFEGan3a8G+AJCrcq4a/z8PrCmZ7m6c7qaALg= github.com/jfrog/gofrog v1.1.2/go.mod h1:9YN5v4LlsCfLIXpwQnzSf1wVtgjdHM20FzuIu58RMI4= -github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220621124242-4fe813879da6 h1:Jp3uRvcUkRPw4BglFcZhgTZOQoCx7pQ8QXAxyKi7h7E= -github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220621124242-4fe813879da6/go.mod h1:/PUSjB1NR6PF1LO9tcdbUnrA8YsFoRwsMAXx9Ntfk/o= +github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220623085425-26d8ddbd18ef h1:Yo2eCfMkWYniOF+iiyNjVrvWy0dYb9UByvgabKpAx2w= +github.com/jfrog/jfrog-cli-core/v2 v2.16.1-0.20220623085425-26d8ddbd18ef/go.mod h1:+3QQ+tf3L1a67JV4yyGJUP2s2pvlIQilxk/A15fTkJY= github.com/jfrog/jfrog-client-go v1.14.1-0.20220621123826-1e21b88b991f h1:l+vtDv9wmgCyUnECIO2gtRuwirZ2ulrbDJm7VsYrDPQ= github.com/jfrog/jfrog-client-go v1.14.1-0.20220621123826-1e21b88b991f/go.mod h1:s1sXsJo8sXngALx5hEd/w5U0INuKKFmZnNk6Tk/QXQE= github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= diff --git a/scan/cli.go b/scan/cli.go index c6bc61fba..1c9f60d25 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -158,7 +158,7 @@ func AuditCmd(c *cli.Context) error { } } auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditMvnCmd(c *cli.Context) error { @@ -169,7 +169,7 @@ func AuditMvnCmd(c *cli.Context) error { } technologies := []string{coreutils.Maven} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditGradleCmd(c *cli.Context) error { @@ -180,7 +180,7 @@ func AuditGradleCmd(c *cli.Context) error { } technologies := []string{coreutils.Gradle} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditNpmCmd(c *cli.Context) error { @@ -191,7 +191,7 @@ func AuditNpmCmd(c *cli.Context) error { } technologies := []string{coreutils.Npm} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditGoCmd(c *cli.Context) error { @@ -202,7 +202,7 @@ func AuditGoCmd(c *cli.Context) error { } technologies := []string{coreutils.Go} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditPipCmd(c *cli.Context) error { @@ -213,7 +213,7 @@ func AuditPipCmd(c *cli.Context) error { } technologies := []string{coreutils.Pip} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditPipenvCmd(c *cli.Context) error { @@ -224,7 +224,7 @@ func AuditPipenvCmd(c *cli.Context) error { } technologies := []string{coreutils.Pipenv} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func AuditNugetCmd(c *cli.Context) error { @@ -235,7 +235,7 @@ func AuditNugetCmd(c *cli.Context) error { } technologies := []string{coreutils.Nuget} auditCmd.SetTechnologies(technologies) - return commands.Exec(auditCmd) + return progressbar.ExecWithProgress(auditCmd, true) } func creatGenericAuditCmd(c *cli.Context) (*audit.GenericAuditCommand, error) {