Skip to content

Commit 7c7010a

Browse files
authored
Merge pull request #731 from 0liver/patch-1
Update error message when missing version argument. Fixes #722.
2 parents 1f7a706 + 3cbd0f7 commit 7c7010a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nvm.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func getVersion(version string, cpuarch string, localInstallsOnly ...bool) (stri
197197
}
198198

199199
if version == "" {
200-
return "", cpuarch, errors.New("Invalid version.")
200+
return "", cpuarch, errors.New("A version argument is required but missing.")
201201
}
202202

203203
// If user specifies "latest" version, find out what version is
@@ -212,7 +212,7 @@ func getVersion(version string, cpuarch string, localInstallsOnly ...bool) (stri
212212
if version == "newest" {
213213
installed := node.GetInstalled(env.root)
214214
if len(installed) == 0 {
215-
return version, "", errors.New("No versions of node.js found. Try installing the latest by typing nvm install latest")
215+
return version, "", errors.New("No versions of node.js found. Try installing the latest by typing nvm install latest.")
216216
}
217217

218218
version = installed[0]
@@ -449,7 +449,7 @@ func uninstall(version string) {
449449
} else if strings.ToLower(version) == "newest" {
450450
installed := node.GetInstalled(env.root)
451451
if len(installed) == 0 {
452-
fmt.Println("No versions of node.js found. Try installing the latest by typing nvm install latest")
452+
fmt.Println("No versions of node.js found. Try installing the latest by typing nvm install latest.")
453453
return
454454
}
455455

@@ -916,7 +916,7 @@ func useArchitecture(a string) {
916916
if a == "32" || a == "64" {
917917
env.arch = a
918918
saveSettings()
919-
fmt.Println("Set to "+a+"-bit mode")
919+
fmt.Println("Set to "+a+"-bit mode.")
920920
} else {
921921
fmt.Println("Cannot set architecture to "+a+". Must be 32 or 64 are acceptable values.")
922922
}

0 commit comments

Comments
 (0)