HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //lib/google-cloud-sdk/platform/bq/frontend/command_info.py
#!/usr/bin/env python
"""The BQ CLI `info` command."""

import bq_utils
from frontend import bigquery_command
from gcloud_wrapper import gcloud_runner

# The usage string acts as the docstring for the class.
# pylint: disable=missing-class-docstring


class Info(bigquery_command.BigqueryCmd):
  usage = """info"""

  def _NeedsInit(self) -> bool:
    """If just printing known versions, don't run `init` first."""
    return False

  def RunWithArgs(self) -> None:
    """Return the execution information of bq."""
    print(bq_utils.GetInfoString())

    proc = gcloud_runner.run_gcloud_command(['info'])
    if proc.stdout:
      print('With the following gcloud configuration:\n')
      print(''.join(proc.stdout.readlines()))