justinmayer / virtualfish

Fish shell tool for managing Python virtual environments
MIT License
1.06k stars 100 forks source link

Preserve .project file when doing vf upgrade --rebuild #206

Closed cecep2 closed 3 years ago

cecep2 commented 3 years ago

Currently, if my venv project-venv contains a .project file, this file is not recreated when I call vf upgrade --rebuild project-venv. I think it is reasonable to expect the 'rebuild' command to restore this file.

justinmayer commented 3 years ago

Makes sense to me. Do you think we should set the variable scope to avoid the (admittedly small) risk that a global variable with the same name has already been defined? e.g.:

if begin; set -q _flag_rebuild; or test -n "$packages"; end
            set -l install_cmd
            set -l project_file_path
            […]
cecep2 commented 3 years ago

Thank you! Good point - I've updated the file accordingly and also document the change in the docs.

justinmayer commented 3 years ago

Nice work on this, @cecep2. Much appreciated! 💯