Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Warn when logger is available (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreyd committed Apr 28, 2023
1 parent e96a3b5 commit 38bb577
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions doozerlib/cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,14 +806,15 @@ def images_build_image(runtime, repo_type, repo, push_to_defaults, push_to, scra
3. You will probably want to use --scratch since it is unlikely you want your
custom build tagged.
"""
if runtime.assembly != 'stream' and comment_on_pr:
runtime.logger.warning("Commenting on PRs is only supported for stream assembly")
comment_on_pr = False

# Initialize all distgit directories before trying to build. This is to
# ensure all build locks are acquired before the builds start and for
# clarity in the logs.
runtime.initialize(clone_distgits=True)

if runtime.assembly not in ['stream', 'test'] and comment_on_pr:
runtime.logger.warning("Commenting on PRs is only supported for stream/test assemblies")
comment_on_pr = False

runtime.assert_mutation_is_permitted()

cmd = runtime.command
Expand Down

0 comments on commit 38bb577

Please sign in to comment.