summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/_frontend/app.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/buildstream/_frontend/app.py b/buildstream/_frontend/app.py
index af38ae901..b6da079bd 100644
--- a/buildstream/_frontend/app.py
+++ b/buildstream/_frontend/app.py
@@ -194,11 +194,6 @@ class App():
except BstError as e:
self._error_exit(e, "Error instantiating platform")
- try:
- self.context.artifactcache.preflight()
- except BstError as e:
- self._error_exit(e, "Error instantiating artifact cache")
-
# Create the logger right before setting the message handler
self.logger = LogLine(self.context,
self._content_profile,
@@ -211,6 +206,13 @@ class App():
# Propagate pipeline feedback to the user
self.context.set_message_handler(self._message_handler)
+ # Preflight the artifact cache after initializing logging,
+ # this can cause messages to be emitted.
+ try:
+ self.context.artifactcache.preflight()
+ except BstError as e:
+ self._error_exit(e, "Error instantiating artifact cache")
+
#
# Load the Project
#