Skip to content

Commit

Permalink
more log stmts
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshnoronha committed Oct 3, 2024
1 parent 5ef89a8 commit 21ad0ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions cmd/dt.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,10 @@ func extractDtArgs(cmd *cobra.Command, args []string) (*dt.Params, error) {
if _, err := uuid.Parse(output); err == nil {
aParams.Upload = true
aParams.UploadProjectID = uuid.MustParse(output)
fmt.Printf("Upload: %v and SBOM to Project ID: %v \n", aParams.Upload, aParams.UploadProjectID)
} else {
// Assume it's a file path
aParams.Output = output
aParams.Upload = false
fmt.Printf("Upload: %v and SBOM to Project ID: %v \n", aParams.Upload, aParams.Output)
}

for _, arg := range args {
Expand Down
3 changes: 2 additions & 1 deletion pkg/dt/dt_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func (dtP *Params) PopulateInputField(ctx context.Context) {

prj, err := dTrackClient.Project.Get(ctx, pid)
if err != nil {
log.Fatalln("Failed to get project: %s", err)
log.Infof("Failed to get project, Check projectID or API port or Hostname.")
log.Fatalf("Failed to get project: %s", err)
}
log.Debugf("ID: %s, Name: %s, Version: %s", prj.UUID, prj.Name, prj.Version)

Expand Down

0 comments on commit 21ad0ce

Please sign in to comment.