sapling/tests/integration/lib_buck.py
Mateusz Kwapich 6c5b692bb3 autoformat all of fbcode/scm with black
Summary: blackpylogo

Reviewed By: krallin

Differential Revision: D16543521

fbshipit-source-id: 75977d00329e1068a92a344c99e0ad0392601c54
2019-07-30 08:19:24 -07:00

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)