mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Updated support for env var expansion
This commit is contained in:
@@ -788,6 +788,7 @@ func setup() {
|
||||
// Process each line and extract the value
|
||||
for _, line := range lines {
|
||||
line = strings.Trim(line, " \r\n")
|
||||
line = os.ExpandEnv(line)
|
||||
if strings.HasPrefix(line, "root:") {
|
||||
env.root = filepath.Clean(strings.TrimSpace(regexp.MustCompile("^root:").ReplaceAllString(line, "")))
|
||||
} else if strings.HasPrefix(line, "originalpath:") {
|
||||
|
||||
Reference in New Issue
Block a user