Skip to content

Commit

Permalink
[feat] Verbose credential error
Browse files Browse the repository at this point in the history
Took 4 minutes
  • Loading branch information
aomerk committed Jun 24, 2021
1 parent 8b73015 commit 9239544
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cli/commands/agent/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,19 @@ func installAgentCmd(cmd *cobra.Command, _ []string) error {

// early cut if bad credentials
if cliConfig.UserAPIToken == "" {
return errors.Errorf("empty user api token during installation. Please")
return errors.Errorf(`empty user api token during installation. Please check out documentation.
If you haven't set up your cli, you can set it up during installation:
$ strixeye agent install --interactive
`)
}
// early cut if bad agent id
if cliConfig.AgentID == "" {
return errors.Errorf("empty user api token during installation. Please")
}
return errors.Errorf(`empty agent id in configuration. Please check out documentation.
If you haven't set up your cli, you can set it up during installation:
$ strixeye agent install --interactive
`) }


// get agent config from remote.
Expand Down

0 comments on commit 9239544

Please sign in to comment.