@@ -44,7 +44,7 @@ func NoCurrentDirectoryCfg(ctx context.Context, NowPath string, path string, res
4444 if filepath .Dir (path ) == NowPath {
4545 return nil
4646 }
47- if strings .Contains (path , "http" ) {
47+ if strings .Contains (path , "http://" ) || strings . Contains ( path , "https:// " ) {
4848 resp , err := http .Get (path )
4949 if err != nil {
5050 log .Error ("http get failed" , zap .Error (err ))
@@ -61,7 +61,6 @@ func NoCurrentDirectoryCfg(ctx context.Context, NowPath string, path string, res
6161 return e
6262 }
6363 } else {
64- // 如果不是远程连接 则尝试打开读取
6564 extends , e = parseBuildoutCfgFile (ctx , path , result )
6665 if e != nil {
6766 return e
@@ -77,8 +76,8 @@ func findVersionsFile(ctx context.Context, path string, result map[string]string
7776 var log = logctx .Use (ctx ).Sugar ()
7877 var extends string
7978 var e error
80- // 如果事远程链接 则读取
81- if strings .Contains (path , "http" ) {
79+ // 如果是远程链接 则读取
80+ if strings .Contains (path , "http://" ) || strings . Contains ( path , "https:// " ) {
8281 resp , err := http .Get (path )
8382 if err != nil {
8483 log .Error ("http get failed" , zap .Error (err ))
@@ -95,7 +94,7 @@ func findVersionsFile(ctx context.Context, path string, result map[string]string
9594 return e
9695 }
9796 } else {
98- // 如果不是远程连接 则尝试打开读取
97+ // 如果不是远程链接 则尝试打开读取
9998 extends , e = parseBuildoutCfgFile (ctx , path , result )
10099 if e != nil {
101100 return e
@@ -139,6 +138,7 @@ func parseBuildoutCfgFile(ctx context.Context, path string, result map[string]st
139138 log .Error ("Fail to read file: " , zap .Error (err ))
140139 return "" , err
141140 }
141+
142142 for _ , section := range cfg .Sections () {
143143 if section .Name () == "version" || section .Name () == "dependencies" || section .Name () == "versions" {
144144 for _ , key := range section .Keys () {
0 commit comments