Skip to content

Commit

Permalink
Added support for vX.X.X and removed option to open prompt after inst…
Browse files Browse the repository at this point in the history
…all.
  • Loading branch information
coreybutler committed Jul 2, 2016
1 parent 7a45443 commit 2c6ed84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
SET INNOSETUP=%CD%\nvm.iss
SET ORIG=%CD%
SET GOPATH=%CD%\src
REM SET GOPATH=%CD%\src
SET GOBIN=%CD%\bin
SET GOARCH=386
SET version=1.1.1
Expand Down
1 change: 0 additions & 1 deletion nvm.iss
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ end;
[Run]
Filename: "{cmd}"; Parameters: "/C ""mklink /D ""{code:getSymLink}"" ""{code:getCurrentVersion}"""" "; Check: isNodeAlreadyInUse; Flags: runhidden;
Filename: "{cmd}"; Parameters: "/K ""set PATH={app};%PATH% && cls && nvm"""; Flags: runasoriginaluser postinstall skipifsilent;

[UninstallDelete]
Type: files; Name: "{app}\nvm.exe";
Expand Down
8 changes: 4 additions & 4 deletions src/nvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ func install(version string, cpuarch string) {
version = reg.ReplaceAllString(re.FindString(content),"")
}

version = cleanVersion(version)

if CheckVersionExceedsLatest(version) {
fmt.Println("Node.js v"+version+" is not yet released or available.")
return
fmt.Println("Node.js v"+version+" is not yet released or available.")
return
}

if cpuarch == "64" && !web.IsNode64bitAvailable(version) {
Expand Down Expand Up @@ -311,8 +313,6 @@ func use(version string, cpuarch string) {

cpuarch = arch.Validate(cpuarch)

re := regexp.MustCompile("\\d+.\\d+.\\d+")

version = cleanVersion(version)

// Make sure the version is installed. If not, warn.
Expand Down

0 comments on commit 2c6ed84

Please sign in to comment.