Skip to content

Commit

Permalink
bugfix: When configuring environment variables, if this version is no…
Browse files Browse the repository at this point in the history
…t installed, then ignore it.
  • Loading branch information
aooohan committed Feb 20, 2024
1 parent 9b4ca42 commit d54f004
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions internal/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ func (m *Manager) EnvKeys() (env.Envs, error) {
var paths []string
for k, v := range m.Record.Export() {
if lookupSdk, err := m.LookupSdk(k); err == nil {
keys, err := lookupSdk.EnvKeys(Version(v))
if err != nil {
return nil, err
}
for key, value := range keys {
if key == "PATH" {
paths = append(paths, *value)
} else {
shellEnvs[key] = value
if keys, err := lookupSdk.EnvKeys(Version(v)); err == nil {
for key, value := range keys {
if key == "PATH" {
paths = append(paths, *value)
} else {
shellEnvs[key] = value
}
}
}
}
Expand Down

0 comments on commit d54f004

Please sign in to comment.