vfox icon indicating copy to clipboard operation
vfox copied to clipboard

[Feature]: Do not print and set environment variables when there is no need to set environment variables when executing vfox env -s xxx

Open jan-bar opened this issue 1 year ago • 2 comments

1. Your usage scenarios?

When there is no need to set environment variables and you don’t want the terminal to set environment variables every time you execute a command

2. What is your expected outcome?

image

Is it possible to achieve this function by changing the code in the picture above? I’m not sure if there will be bugs after the modification.

jan-bar avatar May 15 '24 06:05 jan-bar

Is it possible to achieve this function by changing the code in the picture above?

This change is a bit complicated, we just need to determine if sdkCurrentPaths is empty, as currently only PATH is being set repeatedly.

https://github.com/version-fox/vfox/blob/099640e4783d0d53edb02d5f31d5909f61a4a202/cmd/commands/env.go#L132

aooohan avatar May 15 '24 07:05 aooohan

This change is a bit complicated, we just need to determine if sdkCurrentPaths is empty, as currently only PATH is being set repeatedly.

This is simpler. If there are no problems with this requirement and change, I look forward to the boss completing this change.

jan-bar avatar May 15 '24 08:05 jan-bar