The suggestion is indeed still valid and highly recommended to prevent environment variable leakage. To implement this fix, you should update the subprocess.run call in hermes_cli/tools_config.py at lines 911-916 to include the env parameter using the _sanitize_subprocess_env helper.
Here are the steps:
- Ensure
from tools.environments.local import _sanitize_subprocess_env is present in your imports.
- Update the
subprocess.run call to pass the sanitized environment dictionary.
Here is the corrected code snippet for lines 911-916:
result = subprocess.run(
[_npm_bin, "install", "--silent"],
capture_output=True,
text=True,
cwd=str(PROJECT_ROOT),
env=_sanitize_subprocess_env(os.environ.copy()),
)
Originally posted by @gemini-code-assist[bot] in #681 (comment)
The suggestion is indeed still valid and highly recommended to prevent environment variable leakage. To implement this fix, you should update the
subprocess.runcall inhermes_cli/tools_config.pyat lines 911-916 to include theenvparameter using the_sanitize_subprocess_envhelper.Here are the steps:
from tools.environments.local import _sanitize_subprocess_envis present in your imports.subprocess.runcall to pass the sanitized environment dictionary.Here is the corrected code snippet for lines 911-916:
Originally posted by @gemini-code-assist[bot] in #681 (comment)