fvm icon indicating copy to clipboard operation
fvm copied to clipboard

Option to specify FVM_HOME directory

Open pbartyik opened this issue 11 months ago • 1 comments

Describe the solution you'd like I want to be able to change fvm's default directory from ~/fvm using environmental variables. I recommend using FVM_HOME.

Describe alternatives you've considered Nothing, as far as I know currently it is not an option to change from ~/fvm

pbartyik avatar Dec 22 '24 14:12 pbartyik

See: https://github.com/leoafarias/fvm/issues/489#issuecomment-2726083364

barraIhsan avatar Mar 15 '25 01:03 barraIhsan

Thanks for the request, @pbartyik! This is already supported via environment variables 🎉

Solution

You can change FVM's cache directory using:

Recommended:

export FVM_CACHE_PATH="$HOME/custom/path"

Legacy (still works):

export FVM_HOME="$HOME/custom/path"

Usage

Add to your shell config (~/.bashrc, ~/.zshrc, etc.):

export FVM_CACHE_PATH="$HOME/Development/flutter-sdks"

Then restart your terminal or run source ~/.bashrc.

Temporary override:

FVM_CACHE_PATH=/tmp/fvm fvm install stable

Documentation

Full details in our configuration guide:
https://fvm.app/documentation/getting-started/configuration

Closing as this functionality already exists. Let me know if you need help setting it up!

leoafarias avatar Oct 31 '25 17:10 leoafarias

Feature already supported via FVM_CACHE_PATH environment variable

leoafarias avatar Oct 31 '25 17:10 leoafarias