Skip to content

Commit

Permalink
fix: regression for #162
Browse files Browse the repository at this point in the history
fix #170
  • Loading branch information
aooohan committed Apr 3, 2024
1 parent a1ef555 commit cf58167
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cmd/commands/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,16 @@ func envCmd(ctx *cli.Context) error {

// Takes the complement of previousPaths and sdkPaths, and removes the complement from osPaths.
previousPaths := env.NewPaths(env.PreviousPaths)
jointCnt := 0
for _, pp := range previousPaths.Slice() {
if sdkPaths.Contains(pp) {
previousPaths.Remove(pp)
jointCnt++
}
}
osPaths := env.NewPaths(env.OsPaths)
if previousPaths.Len() != 0 {
for _, pp := range previousPaths.Slice() {
osPaths.Remove(pp)
}
} else if sdkPaths.Len() == jointCnt {
// sdkPaths == previousPaths, No need to set environment variables
return nil
}
// Set the sdk paths to the new previous paths.
newPreviousPathStr := sdkPaths.String()
Expand Down

0 comments on commit cf58167

Please sign in to comment.