You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BME tracks status, some project configurations, etc. under the hardcoded directory "${BME_PROJECT_DIR}/${BME_HIDDEN_DIR}/" (and also under "~/${BME_HIDDEN_DIR}/").
This has shown to be a problem under one usecase of mine: when taking advantage of the python virtualenvs module and sharing a project root's directory between a host and a container, it may happen that the built virtualenv is not compatible between both so when entering into the project space from the host, it creates a virtualenv that can't be used within the container and vice versa. I suppose this can also happen with other modules architecture-dependent, like the terraform one.
I think it'd be good if the project's hardcoded directory could be overwritten, say, by an environment variable, so the one from the host doesn't overlap with the one used within the container. This could mean some more wasted space and maybe some other directory to be added to .gitignore but I consider this to be a reasonable trade off.
WORKAROUND: right now I delete the offending directory each time I start my container but this leads to virtualenvs having to be rebuilt each time I go in and out of my container.
The text was updated successfully, but these errors were encountered:
A possible workaround (still didn't consider all possible side effects):
Setting the environment variable BME_HIDDEN_DIR to a new value different to its '.bme.d' default should do the expected.
I.e.: within the project's .bme_project file you could do something like this (possibly adding some logic about when to set or not the new value):
(...)
old_hidden_dir="${BME_HIDDEN_DIR}"
BME_HIDDEN_DIR='.bme.different'bme_custom_clean() {
bme_log "Custom cleaning..." info 1
BME_HIDDEN_DIR="${old_hidden_dir}"unset old_hidden_dir
bme_log "Custom cleaning finished" info 1
}
Since it's set at session start, when BME is first loaded, global BME_CONFIG_DIR value should be preserved (pointing to ~/.bme.d) but the project's hidden dir would be set before any module is loaded so it would set and use the new value.
The value is properly restored before going out the project space with the help of bme_custom_clean() function.
BEWARE: I still didn't properly test this, but as of now I don't see any obvious drawback.
BME tracks status, some project configurations, etc. under the hardcoded directory "${BME_PROJECT_DIR}/${BME_HIDDEN_DIR}/" (and also under "~/${BME_HIDDEN_DIR}/").
This has shown to be a problem under one usecase of mine: when taking advantage of the python virtualenvs module and sharing a project root's directory between a host and a container, it may happen that the built virtualenv is not compatible between both so when entering into the project space from the host, it creates a virtualenv that can't be used within the container and vice versa. I suppose this can also happen with other modules architecture-dependent, like the terraform one.
I think it'd be good if the project's hardcoded directory could be overwritten, say, by an environment variable, so the one from the host doesn't overlap with the one used within the container. This could mean some more wasted space and maybe some other directory to be added to .gitignore but I consider this to be a reasonable trade off.
WORKAROUND: right now I delete the offending directory each time I start my container but this leads to virtualenvs having to be rebuilt each time I go in and out of my container.
The text was updated successfully, but these errors were encountered: