no command to rename environment
tksoh opened this issue · comments
I'm unable to find the command to rename the environments I created earlier. Is it supported? If not, any way to get this done. Thanks.
For now you can simply rename the folder or create a new environment with the same version, I recall not implementing a rename command because it would break any projects that depend on it (puro has no way of keeping track of per-project settings globally)
@pingbird if renaming an environment would break projects depending on it, wouldn't 'puro rm' break those projects too? Same thing with us renaming the folder manually.
That is correct, puro rm
and renaming manually would break projects, at least until you run puro use
again to update their preferred environment.
@pingbird Just curious, would it be possible to maintain a map to track the rename, so that puro can look it up to find the new env? This way the projects still using the old env names will not break after the rename. Make sense?
I added global project tracking to prevent puro rm
from breaking projects and a new puro rename
command that automatically updates configs. It will only work for projects that have been open after puro 1.3.6.