markfinal / cruiz

Conan recipe user interface
https://cruiz.readthedocs.io/
Apache License 2.0
11 stars 1 forks source link

Moving local cache does not close and reopen the meta invocation #66

Closed markfinal closed 1 year ago

markfinal commented 1 year ago

Suppose you move the location of a local cache, from A to B.

Moving calls ManageLocalCachesDialog._update_cache_details() which in turn calls ConanContext.change_cache.

Unfortunately, that has an early escape

            if cache_name == self.cache_name:
                return

The name hasn't changed for a move. This means the meta invocation doesn't get closed and restarted.

This means the environment variables for the original location of the cache remain in the running meta invocation.

So a subsequent calls does things like querying the profile dir, which then uses CONAN_USER_HOME/CONAN_HOME as the old directory.