提交 8603d35c 编写于 作者: R rahulroy9202

now checks if input version is greater than latest

上级 e6fdca74
......@@ -119,7 +119,7 @@ func update() {
// }
}
func checkVersionExceedsLatest(version string) bool{
func CheckVersionExceedsLatest(version string) bool{
content := web.GetRemoteTextFile("http://nodejs.org/dist/latest/SHASUMS.txt")
re := regexp.MustCompile("node-v(.+)+msi")
reg := regexp.MustCompile("node-v|-x.+")
......@@ -155,7 +155,7 @@ func install(version string, cpuarch string) {
cpuarch = arch.Validate(cpuarch)
}
if(checkVersionExceedsLatest(version)) {
if CheckVersionExceedsLatest(version) {
fmt.Println("Node.js v"+version+" is not yet released or available.")
return
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册