mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-08 18:02:05 +03:00
getdeps: add env subcommand
Summary: X-link: https://github.com/facebookincubator/zstrong/pull/1025 Add getdeps.py `env` subcommand to get the environment from getdeps in a sourcable form so that its easier to run/test/debug the binaries There is an existing `debug` subcommand, but it starts an interactive shell inside getdeps, which isn't so useful for programatic use. To get the output clean enough to source I switched getdeps print() logging to go to stderr. example usage: ``` $ (source <(./build/fbcode_builder/getdeps.py --allow-system-packages env mononoke_integration); which mononoke) ``` Reviewed By: jdelliot Differential Revision: D64982397 fbshipit-source-id: 65212936d42185e4d395557b56d3dba499caa128
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ee3c033775
commit
5a007c0e3b
@@ -8,6 +8,7 @@
|
||||
import configparser
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
from typing import List
|
||||
|
||||
from .builder import (
|
||||
@@ -391,7 +392,10 @@ class ManifestParser(object):
|
||||
return False
|
||||
for key in envs:
|
||||
val = os.environ.get(key, None)
|
||||
print(f"Testing ENV[{key}]: {repr(val)}")
|
||||
print(
|
||||
f"Testing ENV[{key}]: {repr(val)}",
|
||||
file=sys.stderr,
|
||||
)
|
||||
if val is None:
|
||||
return False
|
||||
if len(val) == 0:
|
||||
|
Reference in New Issue
Block a user