mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Update arch detection.
This commit is contained in:
@@ -62,14 +62,13 @@ func Bit(path string) string {
|
||||
|
||||
func Validate(str string) (string){
|
||||
if str == "" {
|
||||
str = os.Getenv("PROCESSOR_ARCHITECTURE")
|
||||
str = strings.ToLower(os.Getenv("PROCESSOR_ARCHITECTURE"))
|
||||
}
|
||||
if strings.Contains(str, "arm64") {
|
||||
return "arm64"
|
||||
}
|
||||
if strings.ContainsAny(str, "64") {
|
||||
if strings.Contains(str, "64") {
|
||||
return "64"
|
||||
} else {
|
||||
return "32"
|
||||
}
|
||||
}
|
||||
return "32"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user