Skip to content

Commit 34be23e

Browse files
committed
Allow no provider definition in validation
1 parent 239d66f commit 34be23e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

_tests/integration/validate_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ tools:
7272
nodejs: ""
7373
7474
tool_config:
75-
provider: "unsupported"
7675
extra_plugins:
7776
empty-url-tool: ""
7877
`

models/toolprovider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const ToolSyntaxPatternLatest = `(.*):latest$`
2525
const ToolSyntaxPatternInstalled = `(.*):installed$`
2626

2727
func isProviderSupported(providerName string) bool {
28-
return providerName != "" && slices.Contains(ToolProviders, providerName)
28+
return slices.Contains(ToolProviders, providerName) || providerName == "" // Provider is optional, there is a default provider.
2929
}
3030

3131
func validateToolConfig(toolConfig *ToolConfigModel) error {

0 commit comments

Comments
 (0)