mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Added missing function for setting architecture. Completes issue #5.
This commit is contained in:
14
src/nvm.go
14
src/nvm.go
@@ -72,8 +72,20 @@ func main() {
|
||||
case "version":
|
||||
fmt.Println(NvmVersion)
|
||||
case "arch":
|
||||
if strings.Trim(detail," \r\n") != "" {
|
||||
detail = strings.Trim(detail," \r\n")
|
||||
if detail != "32" && detail != "64" {
|
||||
fmt.Println("\""+detail+"\" is an invalid architecture. Use 32 or 64.")
|
||||
return
|
||||
}
|
||||
env.arch = detail
|
||||
saveSettings()
|
||||
fmt.Println("Default architecture set to "+detail+"-bit.")
|
||||
return
|
||||
}
|
||||
_, a := node.GetCurrentVersion()
|
||||
fmt.Println(a+"-bit")
|
||||
fmt.Println("System Default: "+env.arch+"-bit.")
|
||||
fmt.Println("Currently Configured: "+a+"-bit.")
|
||||
case "proxy":
|
||||
if detail == "" {
|
||||
fmt.Println("Current proxy: "+env.proxy)
|
||||
|
||||
Reference in New Issue
Block a user