Skip to content

refactor: use shims instead of direct operations on PATH - #256

Merged
aooohan merged 9 commits into
mainfrom
refactor/shims
May 11, 2024
Merged

aooohan merged 9 commits into
mainfrom
refactor/shims

Conversation

@aooohan

@aooohan aooohan commented May 9, 2024 •

Copy link
Copy Markdown
Member

fix #253
fix #84
fix #235
fix version-fox/vfox-golang#9

Instead of modifying the PATH directly, this change uses the fixed path $VFOX_HOME/shims and $VFOX_SHELL_TMEP/shims instead.

Currently, the way to generate shim is very violent, later we need to ask plugins to tell vfox what bins need to be generated shim. see https://github.com/version-fox/vfox/discussions/191#discussioncomment-9064948

@aooohan aooohan added this to the 0.5.0 milestone May 9, 2024
@aooohan
aooohan requested review from Chance-fyi, bytemain and jan-bar May 9, 2024 09:20
@aooohan

aooohan commented May 9, 2024

Copy link
Copy Markdown
Member Author
image

@aooohan

aooohan commented May 9, 2024

Copy link
Copy Markdown
Member Author
image

@bytemain bytemain changed the title refactor: Use shims instead of direct operations on PATH. refactor: use shims instead of direct operations on PATH May 9, 2024
@aooohan
aooohan marked this pull request as draft May 10, 2024 01:41
@aooohan

aooohan commented May 10, 2024

Copy link
Copy Markdown
Member Author

There's a problem on Windows, so change this to a draft.

@jan-bar

jan-bar commented May 10, 2024

Copy link
Copy Markdown
Contributor

There's a problem on Windows, so change this to a draft.

As I expected the directory to be the link instead of the executable file, many tools' executable programs will depend on the directory they are in.

Just like https://github.com/Schniz/fnm

@aooohan

aooohan commented May 10, 2024

Copy link
Copy Markdown
Member Author

As I expected the directory to be the link instead of the executable file, many tools' executable programs will depend on the directory they are in.

Yes. It's not that big of a problem, we can just implement the program exactly as mentioned in #84.

@jan-bar

jan-bar commented May 10, 2024

Copy link
Copy Markdown
Contributor

Yes. It's not that big of a problem, we can just implement the program exactly as mentioned in #84.

I like the soft link directory solution very much. I have used several version management tools using this method and it works well. I look forward to this implementation.

@aooohan

aooohan commented May 10, 2024

Copy link
Copy Markdown
Member Author
image

The problem on Windows has been solved, and the original plan is still used.

@aooohan
aooohan marked this pull request as ready for review May 10, 2024 05:58
@aooohan
aooohan merged commit a6370f4 into main May 11, 2024
@aooohan
aooohan deleted the refactor/shims branch May 11, 2024 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants