Skip to content

Commit 6883f92

Browse files
committed
log alias usage as warning
1 parent a837e57 commit 6883f92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/toolsets/toolsets.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,12 @@ type ToolLookupResult struct {
339339
}
340340

341341
// FindToolByName searches all toolsets (enabled or disabled) for a tool by name.
342-
// It resolves deprecated aliases automatically.
342+
// It resolves deprecated aliases automatically and logs a warning when an alias is used.
343343
// Returns the tool, its parent toolset name, and an error if not found.
344344
func (tg *ToolsetGroup) FindToolByName(toolName string) (*ServerTool, string, error) {
345345
// Resolve deprecated alias if applicable
346346
if canonicalName, isAlias := tg.deprecatedAliases[toolName]; isAlias {
347+
fmt.Fprintf(os.Stderr, "Warning: tool %q is deprecated, use %q instead\n", toolName, canonicalName)
347348
toolName = canonicalName
348349
}
349350

0 commit comments

Comments
 (0)