Skip to content

Commit

Permalink
🐛 fixes two issues with the command builder (#343)
Browse files Browse the repository at this point in the history
- we accidentally attached the ebs subcommand twice to the aws root
command
- the gitlab command used the wrong provider type
  • Loading branch information
chris-rock authored Oct 19, 2022
1 parent 15641b2 commit 9bdd413
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions apps/cnquery/cmd/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ func buildCmd(baseCmd *cobra.Command, commonCmdFlags commonFlagsFn, preRun commo
awsEc2.AddCommand(awsEc2Connect)

awsEc2EbsCmd := awsEc2EbsProviderCmd(commonCmdFlags, preRun, runFn, docs)
awsEc2.AddCommand(awsEc2EbsCmd)

awsEc2EbsVolumeCmd := awsEc2EbsVolumeProviderCmd(commonCmdFlags, preRun, runFn, docs)
awsEc2EbsCmd.AddCommand(awsEc2EbsVolumeCmd)
awsEc2EbsSnapshotCmd := awsEc2EbsSnapshotProviderCmd(commonCmdFlags, preRun, runFn, docs)
Expand Down Expand Up @@ -674,7 +672,7 @@ func gitlabProviderCmd(commonCmdFlags commonFlagsFn, preRun commonPreRunFn, runF
preRun(cmd, args)
},
Run: func(cmd *cobra.Command, args []string) {
runFn(cmd, args, providers.ProviderType_GITHUB, DefaultAssetType) // TODO: does not indicate individual assets
runFn(cmd, args, providers.ProviderType_GITLAB, DefaultAssetType) // TODO: does not indicate individual assets
},
}
commonCmdFlags(cmd)
Expand Down
2 changes: 1 addition & 1 deletion motor/providers/gitlab/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func New(tc *providers.Config) (*Provider, error) {
}

if token == "" {
return nil, errors.New("you need to provide GitLab token")
return nil, errors.New("you need to provide GitLab token e.g. via GITLAB_TOKEN env")
}

client, err := gitlab.NewClient(token)
Expand Down

0 comments on commit 9bdd413

Please sign in to comment.