Skip to content

Commit 3f0dba1

Browse files
committed
Updated go-where dependency and cleaned up debug output.
1 parent 9dff814 commit 3f0dba1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ go 1.18
77
require (
88
github.com/blang/semver v3.5.1+incompatible
99
github.com/coreybutler/go-fsutil v1.2.0
10-
github.com/coreybutler/go-where v1.0.1
10+
github.com/coreybutler/go-where v1.0.2
1111
github.com/olekukonko/tablewriter v0.0.5
1212
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d
1313
golang.org/x/sys v0.1.0

src/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdn
22
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
33
github.com/coreybutler/go-fsutil v1.2.0 h1:kbm62NSofawglUppEOhpHC3NDf/J7ZpguBirBnsgUwU=
44
github.com/coreybutler/go-fsutil v1.2.0/go.mod h1:B+6ufEkkRZgFwyR2sHEVG9dMzVBU3GbyGyYmCq7YkEk=
5-
github.com/coreybutler/go-where v1.0.1 h1:O88ndeqvrmuoq/2OfT+irLfzsjGrextvaNXE5pSEXUo=
6-
github.com/coreybutler/go-where v1.0.1/go.mod h1:IqV4saJiDXdNJURfTfVRywDHvY1IG5F+GXb2kmnmEe8=
5+
github.com/coreybutler/go-where v1.0.2 h1:Omit67KeTtKpvSJjezVxnVD4qMtvlXDlItiKpVCdcl4=
6+
github.com/coreybutler/go-where v1.0.2/go.mod h1:IqV4saJiDXdNJURfTfVRywDHvY1IG5F+GXb2kmnmEe8=
77
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
88
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
99
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=

src/nvm.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,18 +975,20 @@ func checkLocalEnvironment() {
975975
}
976976

977977
executable := os.Args[0]
978-
path, err := where.Find(executable)
978+
path, err := where.Find(filepath.Base(executable))
979+
979980
if err != nil {
980981
path = "UNKNOWN: " + err.Error()
981982
}
982983

983-
out := "Unknown"
984+
out := "none\n(run \"nvm use <version>\" to activate a version)\n"
984985
output, err := exec.Command(os.Getenv("NVM_SYMLINK")+"\\node.exe", "-v").Output()
985986
if err == nil {
986987
out = string(output)
987988
}
988989

989-
fmt.Printf("\nPath: %v\nNVM4W Version: %v\nNVM_HOME: %v\nNVM_SYMLINK: %v\nNode Installation Root: %v\n\nActive Node.js Version: %v", path, NvmVersion, home, symlink, env.root, out)
990+
nvmhome := os.Getenv("NVM_HOME")
991+
fmt.Printf("\nNVM4W Version: %v\nNVM4W Path: %v\nNVM4W Settings: %v\nNVM_HOME: %v\nNVM_SYMLINK: %v\nNode Installations: %v\n\nActive Node.js Version: %v", NvmVersion, path, home, nvmhome, symlink, env.root, out)
990992

991993
if !nvmsymlinkfound {
992994
problems = append(problems, "The NVM4W symlink ("+env.symlink+") was not found in the PATH environment variable.")

0 commit comments

Comments
 (0)