fix: #180 provide explicit instruction to use vet community mode when auth verify fails

This commit is contained in:
abhisek 2024-01-01 10:36:47 +05:30
parent 875d96b4f0
commit bd743347d0
No known key found for this signature in database
GPG Key ID: CB92A4990C02A88F

View File

@ -154,9 +154,14 @@ func listParsersCommand() *cobra.Command {
func startScan() {
if !disableAuthVerifyBeforeScan {
failOnError("auth/verify", auth.Verify(&auth.VerifyConfig{
err := auth.Verify(&auth.VerifyConfig{
ControlPlaneApiUrl: auth.DefaultControlPlaneApiUrl(),
}))
})
if err != nil {
failOnError("auth/verify", fmt.Errorf("failed to verify auth token: %v. "+
"You may want to setup community mode using: vet auth configure --community", err))
}
}
if auth.CommunityMode() {