Merge remote-tracking branch 'goodrain/V5.2' into V5.2

This commit is contained in:
GLYASAI 2020-12-09 10:54:52 +08:00
commit 69754b8a10

View File

@ -175,7 +175,7 @@ func readNodeRuntimeInfo(buildPath string) (map[string]string, error) {
if v := json.Get("engines").Get("node"); v != nil {
nodeVersion, _ := v.String()
// The latest version is used by default. (11.1.0 is latest version in ui)
if strings.HasPrefix(nodeVersion, ">") || strings.HasPrefix(nodeVersion, "*") {
if strings.HasPrefix(nodeVersion, ">") || strings.HasPrefix(nodeVersion, "*") || strings.HasPrefix(nodeVersion, "^") {
nodeVersion = "11.1.0"
}
runtimeInfo["RUNTIMES"] = nodeVersion