@@ -35,7 +35,9 @@ async def pull(repo: Path) -> None:
35
35
proc = await asyncio .create_subprocess_exec ("git" , * args , cwd = repo , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
36
36
ret = await proc .wait ()
37
37
if ret != 0 :
38
- raise RuntimeError (f"Failed to pull { repo } " )
38
+ stdout , stderr = await proc .communicate ()
39
+ out = stdout .decode () + stderr .decode ()
40
+ raise RuntimeError (f"Failed to pull { repo } : { out } " )
39
41
40
42
41
43
async def status (repo : Path ) -> GitStatus :
@@ -64,7 +66,9 @@ async def add(repo: Path, files: Set[str]) -> None:
64
66
proc = await asyncio .create_subprocess_exec ("git" , * args , cwd = repo , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
65
67
ret = await proc .wait ()
66
68
if ret != 0 :
67
- raise RuntimeError (f"Failed to add { files } to { repo } " )
69
+ out , err = await proc .communicate ()
70
+ all_out = out .decode () + err .decode ()
71
+ raise RuntimeError (f"Failed to add { files } to { repo } . Output: { all_out } " )
68
72
69
73
70
74
async def commit (repo : Path , msg : str ) -> None :
@@ -86,7 +90,9 @@ async def push(repo: Path) -> None:
86
90
proc = await asyncio .create_subprocess_exec ("git" , * args , cwd = repo , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
87
91
ret = await proc .wait ()
88
92
if ret != 0 :
89
- raise RuntimeError (f"Failed to push { repo } " )
93
+ out , err = await proc .communicate ()
94
+ all_out = out .decode () + err .decode ()
95
+ raise RuntimeError (f"Failed to push { repo } . Output: { all_out } " )
90
96
91
97
92
98
async def init (repo : Path ) -> None :
@@ -96,4 +102,6 @@ async def init(repo: Path) -> None:
96
102
proc = await asyncio .create_subprocess_exec ("git" , * args , cwd = repo , stdout = subprocess .PIPE , stderr = subprocess .PIPE )
97
103
ret = await proc .wait ()
98
104
if ret != 0 :
99
- raise RuntimeError (f"Failed to init { repo } " )
105
+ out , err = await proc .communicate ()
106
+ all_out = out .decode () + err .decode ()
107
+ raise RuntimeError (f"Failed to init { repo } . Output: { all_out } " )
0 commit comments