File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 11package engine
22
33import (
4- "crypto/md5"
5- "encoding/hex"
64 "path/filepath"
75 "regexp"
86 "strings"
@@ -21,20 +19,18 @@ func ToolNormalizer(tool string) string {
2119 if strings .HasSuffix (tool , system .Suffix ) {
2220 tool = strings .TrimSuffix (tool , filepath .Ext (tool ))
2321 }
22+ tool = strings .TrimPrefix (tool , "sys." )
2423
2524 if validToolName .MatchString (tool ) {
2625 return tool
2726 }
2827
29- name := invalidChars .ReplaceAllString (tool , "- " )
28+ name := invalidChars .ReplaceAllString (tool , "_ " )
3029 if len (name ) > 55 {
3130 name = name [:55 ]
3231 }
3332
34- hash := md5 .Sum ([]byte (tool ))
35- hexed := hex .EncodeToString (hash [:])
36-
37- return name + "-" + hexed [:8 ]
33+ return name
3834}
3935
4036func PickToolName (toolName string , existing map [string ]struct {}) string {
You can’t perform that action at this time.
0 commit comments