Skip to content

Commit

Permalink
Fix invalid flag processing when no flags set
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Rutkowski <[email protected]>
  • Loading branch information
mrutkows authored and markstur committed Jun 10, 2024
1 parent e264f3f commit 7240bb4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ package cmd
import (
"errors"
"fmt"
"os"
"sort"
"time"

"github.com/CycloneDX/license-scanner/configurer"
"github.com/CycloneDX/license-scanner/debugger"
"github.com/CycloneDX/license-scanner/identifier"
"github.com/CycloneDX/license-scanner/importer"
"github.com/CycloneDX/license-scanner/licenses"
"github.com/CycloneDX/sbom-utility/log"
"os"
"sort"
"time"

"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
Expand Down Expand Up @@ -86,7 +87,7 @@ Please give us feedback at: https://github.com/CycloneDX/license-scanner/issues
return listLicenses(cfg)
} else if cfg.GetString(configurer.AddAllFlag) != "" {
return importer.Import(cfg)
} else if cfg.GetString(configurer.UpdateAllFlag) != "" {
} else if cfg.GetBool(configurer.UpdateAllFlag) {
return importer.Update(cfg)
} else {
// Otherwise, terminate with an error.
Expand Down

0 comments on commit 7240bb4

Please sign in to comment.