Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show stdout for docker pull #121

Merged
merged 2 commits into from
Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion synthtool/gcp/artman.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,6 @@ def _ensure_dependencies_installed(self):

def _install_artman(self):
log.debug("Pulling artman image.")
shell.run(["docker", "pull", f"googleapis/artman:{ARTMAN_VERSION}"])
shell.run(
["docker", "pull", f"googleapis/artman:{ARTMAN_VERSION}"], hide_output=False
)
9 changes: 7 additions & 2 deletions synthtool/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
from synthtool import log


def run(args, *, cwd=None, check=True):
def run(args, *, cwd=None, check=True, hide_output=True):
if hide_output:
stdout = subprocess.PIPE
else:
stdout = None

try:
return subprocess.run(
args,
stdout=subprocess.PIPE,
stdout=stdout,
stderr=subprocess.STDOUT,
cwd=cwd,
check=check,
Expand Down