Skip to content

Commit afd6063

Browse files
Zhaopu Wangmeta-codesync[bot]
authored andcommitted
Replace cygwin temp with gitbash temp in fbcode_builder/get_deps.py
Summary: To fix the series of failing oss-<>-getdeps jobs on windows-basic Exmaple: https://www.internalfb.com/sandcastle/workflow/1850979446860750622 I've read through https://fb.workplace.com/groups/341156780065932/posts/1882502265931368/?comment_id=1883001115881483 And seems like the cygwin temp path was a workaround of this issue that hasn't been fixed yet. I'm replacing the temp path with a gitbash temp path since we're deprecating cygwin. Reviewed By: ericweb2 Differential Revision: D86808921 fbshipit-source-id: a2774403f6092adfa2c3cab65a2d02181d7a3947
1 parent e0ec2f8 commit afd6063

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

build/fbcode_builder/getdeps/buildopts.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from .platform import get_available_ram, HostType, is_windows
2222

2323

24-
CYGWIN_TMP = "c:\\cygwin\\tmp"
24+
GITBASH_TMP = "c:\\tools\\fb.gitbash\\tmp"
2525

2626

2727
def detect_project(path):
@@ -605,14 +605,15 @@ def setup_build_options(args, host_type=None) -> BuildOptions:
605605
)
606606

607607
disk_temp = os.environ["DISK_TEMP"]
608-
if is_windows() and os.path.exists(CYGWIN_TMP):
609-
# prefer the cygwin tmp dir, as its less likely to have a tmp cleaner
608+
if is_windows():
609+
# force use gitbash tmp dir for windows, as its less likely to have a tmp cleaner
610610
# that removes extracted prior dated source files
611+
os.makedirs(GITBASH_TMP, exist_ok=True)
611612
print(
612-
f"Using {CYGWIN_TMP} instead of DISK_TEMP {disk_temp} for scratch dir",
613+
f"Using {GITBASH_TMP} instead of DISK_TEMP {disk_temp} for scratch dir",
613614
file=sys.stderr,
614615
)
615-
disk_temp = CYGWIN_TMP
616+
disk_temp = GITBASH_TMP
616617

617618
scratch_dir = os.path.join(disk_temp, "fbcode_builder_getdeps")
618619
if not scratch_dir:

0 commit comments

Comments
 (0)