Skip to content

Commit

Permalink
in case of mkisofs failure, print the full error
Browse files Browse the repository at this point in the history
  • Loading branch information
hartmans committed Oct 4, 2024
1 parent 79676f7 commit daf8393
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions carthage/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@ async def __aenter__(self):
async def __aexit__(self, *exc_info):
if exc_info[0] is None:
iso_temp = self.path/(self.iso_name+'.tmp')
await sh.xorrisofs(
'-J', '--rational-rock',
'-o', iso_temp,
*self.options,
self.temp.name,
_bg=True, bg_exc=False)
try:
await sh.xorrisofs(
'-J', '--rational-rock',
'-o', iso_temp,
*self.options,
self.temp.name,
_bg=True, bg_exc=False)
except sh.ErrorReturnCode as e:
raise RuntimeError(str(e.stderr, 'utf-8'))

iso_path = self.path/self.iso_name
iso_temp.rename(iso_path)
self._iso_path = iso_path
Expand Down

0 comments on commit daf8393

Please sign in to comment.