scm: Only copy debugging data if we have a compose
If we don't have a compose, this copy will fail. Let's prevent that. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
62a97c0e1b
commit
cda67776d9
@ -174,10 +174,15 @@ class GitWrapper(ScmBase):
|
||||
self.retry_run(["git", "remote", "update", "origin"], workdir=destdir)
|
||||
run(["git", "checkout", branch], workdir=destdir)
|
||||
except RuntimeError:
|
||||
debugdir = os.path.join(self.compose.topdir, os.path.basename(destdir))
|
||||
self.log_debug("Copying %s to %s for debugging" % (destdir, debugdir))
|
||||
makedirs(debugdir)
|
||||
copy_all(destdir, debugdir)
|
||||
if self.compose:
|
||||
debugdir = os.path.join(
|
||||
self.compose.topdir, os.path.basename(destdir)
|
||||
)
|
||||
self.log_debug(
|
||||
"Copying %s to %s for debugging" % (destdir, debugdir)
|
||||
)
|
||||
makedirs(debugdir)
|
||||
copy_all(destdir, debugdir)
|
||||
raise
|
||||
|
||||
self.run_process_command(destdir)
|
||||
|
Loading…
Reference in New Issue
Block a user