Skip to content

Commit

Permalink
Add PYTHONPATH assert to gn.py (#1476)
Browse files Browse the repository at this point in the history
b/299098707
  • Loading branch information
niranjanyardi authored Sep 7, 2023
1 parent 4b3c989 commit 390ffbd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cobalt/build/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ def main(out_directory: str, platform: str, build_type: str,


if __name__ == '__main__':
current_working_dir = os.getcwd()
python_env_var = os.getenv('PYTHONPATH')
assert current_working_dir in python_env_var, 'env variable PYTHONPATH \
should be set to current repo root directory.'

parser = argparse.ArgumentParser()

builds_directory_group = parser.add_mutually_exclusive_group()
Expand Down

0 comments on commit 390ffbd

Please sign in to comment.