Skip to content

Commit

Permalink
usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible committed Mar 17, 2023
1 parent 0b9b9df commit 028c1fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions cmd/azqr/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package azqr

import (
"fmt"
"os"

"github.com/cmendible/azqr/internal/scanners"
"github.com/cmendible/azqr/internal/scanners/afd"
Expand Down Expand Up @@ -83,8 +82,5 @@ var rootCmd = &cobra.Command{
}

func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
cobra.CheckErr(rootCmd.Execute())
}
3 changes: 1 addition & 2 deletions cmd/azqr/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package azqr

import (
"context"
"flag"
"fmt"
"log"
"os"
Expand Down Expand Up @@ -32,7 +31,7 @@ func scan(cmd *cobra.Command, serviceScanners []scanners.IAzureScanner) {
outputFile := fmt.Sprintf("%s_%s", outputFilePrefix, outputFileStamp)

if subscriptionID == "" {
flag.Usage()
_ = cmd.Help()
os.Exit(1)
}

Expand Down

0 comments on commit 028c1fa

Please sign in to comment.