Projects STRLCPY bearer Commits e27461a6
🤬
  • ■ ■ ■ ■
    e2e/flags/.snapshots/TestMetadataFlags-help-scan
    skipped 32 lines
    33 33   --skip-path strings Specify the comma separated files and directories to skip. Supports * syntax, e.g. --skip-path users/*.go,users/admin.sql
    34 34   
    35 35  General Flags
    36  - --config-file string Load configuration from the specified path.
     36 + --config-file string Load configuration from the specified path. (default "bearer.yml")
    37 37   
    38 38   
    39 39  --
    skipped 2 lines
  • ■ ■ ■ ■
    e2e/flags/.snapshots/TestMetadataFlags-scan-help
    skipped 32 lines
    33 33   --skip-path strings Specify the comma separated files and directories to skip. Supports * syntax, e.g. --skip-path users/*.go,users/admin.sql
    34 34   
    35 35  General Flags
    36  - --config-file string Load configuration from the specified path.
     36 + --config-file string Load configuration from the specified path. (default "bearer.yml")
    37 37   
    38 38   
    39 39  --
    skipped 2 lines
  • ■ ■ ■ ■
    e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-context-flag
    skipped 33 lines
    34 34   --skip-path strings Specify the comma separated files and directories to skip. Supports * syntax, e.g. --skip-path users/*.go,users/admin.sql
    35 35   
    36 36  General Flags
    37  - --config-file string Load configuration from the specified path.
     37 + --config-file string Load configuration from the specified path. (default "bearer.yml")
    38 38   
    39 39   
    40 40  flag error: scan flag error: invalid context argument; supported values: health
    skipped 2 lines
  • ■ ■ ■ ■
    e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-format-flag
    skipped 33 lines
    34 34   --skip-path strings Specify the comma separated files and directories to skip. Supports * syntax, e.g. --skip-path users/*.go,users/admin.sql
    35 35   
    36 36  General Flags
    37  - --config-file string Load configuration from the specified path.
     37 + --config-file string Load configuration from the specified path. (default "bearer.yml")
    38 38   
    39 39   
    40 40  flag error: report flags error: invalid format argument; supported values: json, yaml
    skipped 2 lines
  • ■ ■ ■ ■
    e2e/flags/.snapshots/TestReportFlagsShouldFail-invalid-report-flag
    skipped 33 lines
    34 34   --skip-path strings Specify the comma separated files and directories to skip. Supports * syntax, e.g. --skip-path users/*.go,users/admin.sql
    35 35   
    36 36  General Flags
    37  - --config-file string Load configuration from the specified path.
     37 + --config-file string Load configuration from the specified path. (default "bearer.yml")
    38 38   
    39 39   
    40 40  flag error: report flags error: invalid report argument; supported values: security, privacy
    skipped 2 lines
  • ■ ■ ■ ■ ■ ■
    pkg/commands/scan.go
    skipped 6 lines
    7 7   "github.com/bearer/bearer/pkg/flag"
    8 8   "github.com/bearer/bearer/pkg/util/file"
    9 9   "github.com/bearer/bearer/pkg/util/output"
    10  - "github.com/rs/zerolog/log"
    11 10   "github.com/spf13/cobra"
    12 11   "github.com/spf13/viper"
    13 12   "golang.org/x/xerrors"
    skipped 44 lines
    58 57   configPath := viper.GetString(flag.ConfigFileFlag.ConfigName)
    59 58   defaultConfigPath := file.GetFullFilename(args[0], configPath)
    60 59   
    61  - loadedFile := false
     60 + var loadFileMessage string
    62 61   if err := readConfig(configPath); err != nil {
    63 62   if err := readConfig(defaultConfigPath); err != nil {
    64  - log.Debug().Msgf("Couldn't find config file %s or %s", configPath, defaultConfigPath)
     63 + loadFileMessage = fmt.Sprintf("Couldn't find config file %s or %s", configPath, defaultConfigPath)
    65 64   } else {
    66  - log.Debug().Msgf("Loading default config file %s", defaultConfigPath)
    67  - loadedFile = true
     65 + loadFileMessage = fmt.Sprintf("Loading default config file %s", defaultConfigPath)
    68 66   }
    69 67   } else {
    70  - log.Debug().Msgf("Loading config file %s", configPath)
    71  - loadedFile = true
     68 + loadFileMessage = fmt.Sprintf("Loading config file %s", configPath)
    72 69   }
    73 70   
    74 71   options, err := ScanFlags.ToOptions(args)
    skipped 1 lines
    76 73   return xerrors.Errorf("flag error: %w", err)
    77 74   }
    78 75   
    79  - if !options.Quiet && loadedFile {
    80  - output.StdErrLogger().Msgf("Loaded configuration file")
     76 + if !options.Quiet {
     77 + output.StdErrLogger().Msgf(loadFileMessage)
    81 78   }
    82 79   
    83 80   output.Setup(cmd, options)
    skipped 33 lines
Please wait...
Page is in error, reload to recover