Skip to content

Commit 6e3e658

Browse files
scripts/test.py: change --sync-paths to expect tmpfile path.
1 parent 4ba5e77 commit 6e3e658

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

scripts/test.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@
249249
--show-args:
250250
Show sys.argv and exit. For debugging.
251251
252-
--sync-paths
252+
--sync-paths <path>
253253
Do not run anything, instead write required files/directories/checkouts
254-
to stdout, one per line. This is to help with automated running on
254+
to <path>, one per line. This is to help with automated running on
255255
remote machines.
256256
257257
--system-site-packages 0|1
@@ -557,7 +557,7 @@ def main(argv):
557557
elif arg == '--show-args':
558558
show_args = 1
559559
elif arg == '--sync-paths':
560-
sync_paths = True
560+
sync_paths = next(args)
561561

562562
elif arg == '--system-site-packages':
563563
system_site_packages = int(next(args))
@@ -595,10 +595,11 @@ def main(argv):
595595
# Handle special args --sync-paths, -h, -v, -o first.
596596
#
597597
if sync_paths:
598-
# Just print required files, directories and checkouts.
599-
print(pymupdf_dir)
600-
if mupdf_sync:
601-
print(mupdf_sync)
598+
# Print required files, directories and checkouts.
599+
with open(sync_paths, 'w') as f:
600+
print(pymupdf_dir, file=f)
601+
if mupdf_sync:
602+
print(mupdf_sync, file=f)
602603
return
603604

604605
if show_help:

0 commit comments

Comments
 (0)