Skip to content

Commit

Permalink
🐛 fix shell completion
Browse files Browse the repository at this point in the history
The way it was written before, the 3 commands run/shell/scan were missing their providers when they are not in active use. The problem: shell-completion relies on them to exist.

Signed-off-by: Dominik Richter <[email protected]>
  • Loading branch information
arlimus committed Sep 22, 2023
1 parent 3fae907 commit 89eec5c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cli/providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ func AttachCLIs(rootCmd *cobra.Command, commands ...*Command) error {
}

connectorName, autoUpdate := detectConnectorName(os.Args, commands)
if connectorName == "" {
return nil
}

if _, err := providers.EnsureProvider(existing, connectorName, "", autoUpdate); err != nil {
return err
if connectorName != "" {
if _, err := providers.EnsureProvider(existing, connectorName, "", autoUpdate); err != nil {
return err
}
}

// Now that we know we have all providers, it's time to load them to build
Expand Down

0 comments on commit 89eec5c

Please sign in to comment.