This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 679b203bf48 [build] Workaround PIPE bufsize
679b203bf48 is described below

commit 679b203bf481c552dde9d7dd4a932e7309e81d52
Author: tison <[email protected]>
AuthorDate: Fri Feb 17 08:09:03 2023 +0800

    [build] Workaround PIPE bufsize
    
    Signed-off-by: tison <[email protected]>
---
 tools/pytools/lib/execute/site_uploader.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/pytools/lib/execute/site_uploader.py 
b/tools/pytools/lib/execute/site_uploader.py
index 35e8a4359ae..64b99cb3acc 100755
--- a/tools/pytools/lib/execute/site_uploader.py
+++ b/tools/pytools/lib/execute/site_uploader.py
@@ -19,6 +19,7 @@
 
 import enum
 import os
+import tempfile
 from pathlib import Path
 
 from command import run, find_command, run_pipe
@@ -72,5 +73,8 @@ def execute(mode: Mode, msg: str, site: Path, branch: str):
         _do_push(msg, site, branch)
     else:  # show changes
         git = find_command('git', msg="git is required")
-        change_files = run_pipe(git, 'status', '--short', 
cwd=site).read().strip()
-        print(f'\nchange files:\n{change_files}\n')
+        with tempfile.TemporaryFile('w+') as f:
+            run(git, 'status', '--porcelain', stdout=f, cwd=site)
+            f.seek(0)
+            change_files = f.read().strip()
+            print(f'\nchange files:\n{change_files}\n')

Reply via email to