mirror of
https://github.com/ossf/scorecard.git
synced 2024-11-09 17:32:13 +03:00
Log error if GITHUB_AUTH_TOKEN is unset (#680)
Co-authored-by: Azeem Shaikh <azeems@google.com>
This commit is contained in:
parent
99689245ad
commit
7cf56e04af
@ -67,6 +67,10 @@ or ./scorecard --{npm,pypi,rubgems}=<package_name> [--checks=check1,...] [--show
|
||||
Short: "Security Scorecards",
|
||||
Long: "A program that shows security scorecard for an open source software.",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if token, exists := os.LookupEnv("GITHUB_AUTH_TOKEN"); !exists || token == "" {
|
||||
log.Fatalf("GITHUB_AUTH_TOKEN env var is not set. Please set this to your Github PAT before running this command.")
|
||||
}
|
||||
|
||||
cfg := zap.NewProductionConfig()
|
||||
cfg.Level.SetLevel(*logLevel)
|
||||
logger, err := cfg.Build()
|
||||
|
Loading…
Reference in New Issue
Block a user