custom POETRY_CONFIG_DIR doesn't seem to create a config directory with config.toml as intended, #10508
Replies: 1 comment
|
There is a second subtlety: installing Poetry does not create Reuse the same environment for installation and every Poetry invocation (or set it in the parent environment): poetry_env = {
**os.environ,
"POETRY_HOME": str(poetry_home_path),
"POETRY_CONFIG_DIR": str(another_path),
}
subprocess.check_call(installer_cmd, env=poetry_env)
subprocess.check_call(
[str(poetry_executable), "config", "--list"],
env=poetry_env,
)That second command creates So this is not a separate installer/config-directory bug: it is process-local environment scope plus the config file being created lazily. |
Uh oh!
There was an error while loading. Please reload this page.
Hello there!
so I'm using POETRY_CONFIG_DIR in my subprocess call to install poetry, where I'm passing needed env variables.
subprocess.check_call(cmd, env = {**os.environ, "POETRY_HOME": str(<poetry_home_path>), "POETRY_CONFIG_DIR": str(another_path)})it still uses
%appdata%/pypoetry/and not create my custompoetry_config_dir, whilePOETRY_HOMEseems to work fine,am I missing something here?
poetry version : 2.1.3
All reactions