'Call ``publish-installer-images`` capturing stdout and stderr.'

def publish_installer_images(self, args, expect_error=False, extra_enviroment=None):

    working_directory = self.make_temporary_directory()
    environment = os.environ.copy()
    if (extra_enviroment is not None):
        environment.update(extra_enviroment)
    environment['TEMP'] = working_directory.path
    stdout_path = working_directory.child('stdout')
    stderr_path = working_directory.child('stderr')
    self.addDetail('stdout    {!r}'.format(args), content_from_file(stdout_path.path, ContentType('text', 'plain')))
    self.addDetail('stderr    {!r}'.format(args), content_from_file(stderr_path.path, ContentType('text', 'plain')))
    with stdout_path.open('w') as stdout:
        with stderr_path.open('w') as stderr:
            try:
                return_code = check_call(([self.script.path] + args), env=environment, stdout=stdout, stderr=stderr)
            except CalledProcessError as e:
                self.addDetail('CalledProcessError    {!r}'.format(args), text_content(str(e)))
                if expect_error:
                    return_code = e.returncode
                else:
                    raise
    return (return_code, stdout_path, stderr_path)
