Make sure that the cleanup is actually conditional

pull/6/head
yuvipanda 2017-05-22 14:53:44 -07:00
rodzic f571371b37
commit 1d24fdb7c3
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -69,6 +69,7 @@ class Builder(Application):
'source': 'Builder.source_url',
'ref': 'Builder.source_ref',
'output': 'Builder.output_image_spec',
'clean': 'Builder.cleanup_checkout',
'f': 'Builder.config_file',
})
@ -155,7 +156,8 @@ class Builder(Application):
self.log.info('Pushing image', extra=dict(progress=layers, phase='pushing'))
last_emit_time = time.time()
shutil.rmtree(output_path)
if self.cleanup_checkout:
shutil.rmtree(output_path)
if __name__ == '__main__':