vfox icon indicating copy to clipboard operation
vfox copied to clipboard

[BUG]: some of the packages are not changing accordingly

Open padulkemid opened this issue 1 year ago • 7 comments

Version 0.5.4 OS macOS

Describe the bug Won't change version, always fallback to machine's env like java to usr/bin/java and nodejs to usr/local/bin/node.

Is there anything wrong with my setup? since I just brew update && brew upgrade everything yesterday? (might be an issue with some packages that always falling back to default version?)

Screenshots[optional] image

padulkemid avatar Aug 07 '24 15:08 padulkemid

confirmed: work with kotlin and golang, just java and nodejs

padulkemid avatar Aug 07 '24 15:08 padulkemid

image

it appears vfox 's dir in $PATH are added in below from the bin, should we move it to the topmost path?

padulkemid avatar Aug 07 '24 15:08 padulkemid

I think this commit is from months ago and the version before works fine, is this PATH changing state are handled in here?

pathSet := env.NewPaths(env.EmptyPaths)
  for _, item := range items {
  	if item.Key == "PATH" {
		pathSet.Add(item.Value)
	} else {
		envKeys.Variables[item.Key] = &item.Value
	}
  }

envKeys.Paths = pathSet

padulkemid avatar Aug 07 '24 16:08 padulkemid

I have the same issue... But only in my VS Code Terminal .. I use Warp for my main standalone Terminal, and everything works fine there.. any solution to this? @padulkemid maybe you solved it?

kuddl avatar Oct 29 '24 17:10 kuddl

I have the same issue... But only in my VS Code Terminal .. I use Warp for my main standalone Terminal, and everything works fine there.. any solution to this? @padulkemid maybe you solved it?

i think its about the pathing source and stuff (it might be, from the PATH commit earlier) I haven't take a look at it, since it causes my workflow to be broken,so I moved into mise now @kuddl

padulkemid avatar Oct 29 '24 18:10 padulkemid

I "kind of fixed it", but do not know why it worked:

Even though the VSCode terminal said: echo $SHELL -> /bin/zsh vfox was not poperly activated ... I added the bash activate (!) command to my .zshrc, and then it work as expected.

So I have both commands in my .zshrc

# vfox
eval "$(vfox activate zsh)"
eval "$(vfox activate bash)"

I suspect, that something is missing in the zsh variant, that VSCode needs or looks for ...

But for now it works. To @aooohan: Thanks a lot for the project! Maybe this hint / bug is helpful.

kuddl avatar Oct 30 '24 08:10 kuddl

by taking a look at the code, there are subtle differences between activating the shell in zsh and bash, 2 of this has the same commands but there are some quirks that made the same commands achieve different result, might something to do

padulkemid avatar Oct 30 '24 08:10 padulkemid