mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
6c5b692bb3
Summary: blackpylogo Reviewed By: krallin Differential Revision: D16543521 fbshipit-source-id: 75977d00329e1068a92a344c99e0ad0392601c54
19 lines
533 B
Python
19 lines
533 B
Python
#!/usr/bin/env python3
|
|
# Copyright (c) 2019-present, Facebook, Inc.
|
|
# All Rights Reserved.
|
|
#
|
|
# This software may be used and distributed according to the terms of the
|
|
# GNU General Public License version 2 or any later version.
|
|
|
|
import os
|
|
|
|
|
|
def find_buck_out(manifest_path):
|
|
dir = manifest_path
|
|
while dir:
|
|
dir = os.path.dirname(dir)
|
|
if os.path.exists(os.path.join(dir, "project_root")):
|
|
return dir
|
|
m = "%s does not appear to be in a buck-out directory" % manifest_path
|
|
raise ValueError(m)
|