Commit 1d6854a4 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

normalize the scratch path

Summary:
The scratch path is used as part of the hash computation for each project.  We
need to make sure this path is always normalized to ensure that we compute the
hashes consistently.

Reviewed By: chadaustin

Differential Revision: D16354624

fbshipit-source-id: 39b5362620bdc247cd7e7f1333dac319b354dc6f
parent 4c4d3911
...@@ -369,6 +369,14 @@ def setup_build_options(args, host_type=None): ...@@ -369,6 +369,14 @@ def setup_build_options(args, host_type=None):
"Mapping scratch dir %s -> %s" % (scratch_dir, subst), file=sys.stderr "Mapping scratch dir %s -> %s" % (scratch_dir, subst), file=sys.stderr
) )
scratch_dir = subst scratch_dir = subst
else:
if not os.path.exists(scratch_dir):
os.makedirs(scratch_dir)
# Make sure we normalize the scratch path. This path is used as part of the hash
# computation for detecting if projects have been updated, so we need to always
# use the exact same string to refer to a given directory.
scratch_dir = os.path.realpath(scratch_dir)
host_type = _check_host_type(args, host_type) host_type = _check_host_type(args, host_type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment