mirror of
https://github.com/iyear/tdl
synced 2025-01-07 03:16:41 +08:00
fix(extension): remove exe suffix if exists
This commit is contained in:
parent
e45e7fade8
commit
17c3a1c94e
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user