Skip to content

Commit

Permalink
Recover previous fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcferretti committed Aug 2, 2023
1 parent 891ff58 commit 9580c27
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class CombinedDockerRunTask extends AbstractDockerRemoteApiTask {
}
}

} finally {
if (containerId == null) {
return;
}
// Copy output to internal output directory
CopyArchiveFromContainerCmd copyCommand = dockerClient.copyArchiveFromContainerCmd(containerId, remotePath.get())
logger.quiet "Copying '${remotePath.get()}' from container with ID '${containerId}' to '${outputDir.get()}'."
Expand All @@ -127,10 +131,6 @@ class CombinedDockerRunTask extends AbstractDockerRemoteApiTask {
} finally {
tarStream?.close()
}
} finally {
if (containerId == null) {
return;
}
RemoveContainerCmd removeCommand = dockerClient.removeContainerCmd(containerId)
removeCommand.withRemoveVolumes(true)
removeCommand.withForce(true)
Expand Down

0 comments on commit 9580c27

Please sign in to comment.