pingbird / puro

A powerful tool for installing and upgrading Flutter versions.

Home Page:https://puro.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no command to rename environment

tksoh opened this issue · comments

commented

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.

commented

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)

commented

@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.

commented

That is correct, puro rm and renaming manually would break projects, at least until you run puro use again to update their preferred environment.

commented

@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.