提交 58cf1798 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

config before first run

上级 d9ba57cc
......@@ -68,7 +68,7 @@ func initSupportedScriptLang() map[string]map[string]string {
return LangMap
}
func GetSupportLanguageOptions() ([]string, []string, []string) {
func GetSupportLanguageOptions(scriptExtsInDir []string) ([]string, []string, []string) {
arr0 := GetSupportLanguageArrSort()
numbs := make([]string, 0)
......@@ -76,6 +76,15 @@ func GetSupportLanguageOptions() ([]string, []string, []string) {
labels := make([]string, 0)
for idx, lang := range arr0 {
ext := LangMap[lang]["extName"]
if scriptExtsInDir != nil {
found := stringUtils.FindInArr(ext, scriptExtsInDir)
if !found {
continue
}
}
numbs = append(numbs, strconv.Itoa(idx+1))
names = append(names, lang)
......
......@@ -61,7 +61,7 @@ func InputForCheckout(productId *string, moduleId *string, suiteId *string, task
InputForBool(independentFile, false, "enter_co_independent")
numbs, names, labels := langUtils.GetSupportLanguageOptions()
numbs, names, labels := langUtils.GetSupportLanguageOptions(nil)
fmtParam := strings.Join(labels, "\n")
langStr := GetInput("("+strings.Join(numbs, "|")+")", "", "enter_co_language", fmtParam)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册