fix(extension): remove exe suffix if exists

This commit is contained in:
iyear 2024-11-15 14:13:54 +08:00
parent e45e7fade8
commit 17c3a1c94e

View File

@ -3,6 +3,7 @@ package extension
import (
"context"
"fmt"
"path/filepath"
"strings"
"github.com/fatih/color"
@ -155,5 +156,6 @@ func normalizeExtName(n string) string {
if !strings.HasPrefix(n, extensions.Prefix) {
n = extensions.Prefix + n
}
n = strings.TrimSuffix(n, filepath.Ext(n))
return color.New(color.Bold, color.FgCyan).Sprint(n)
}