Skip to content
7 changes: 5 additions & 2 deletions src/google/adk/cli/cli_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
import click
from packaging.version import parse

_IS_WINDOWS = os.name == 'nt'
_GCLOUD_CMD = 'gcloud.cmd' if _IS_WINDOWS else 'gcloud'

_DOCKERFILE_TEMPLATE: Final[str] = """
FROM python:3.11-slim
WORKDIR /app
Expand Down Expand Up @@ -378,7 +381,7 @@ def _resolve_project(project_in_option: Optional[str]) -> str:
return project_in_option

result = subprocess.run(
['gcloud', 'config', 'get-value', 'project'],
[_GCLOUD_CMD, 'config', 'get-value', 'project'],
check=True,
capture_output=True,
text=True,
Expand Down Expand Up @@ -585,7 +588,7 @@ def to_cloud_run(

# Build the command with extra gcloud args
gcloud_cmd = [
'gcloud',
_GCLOUD_CMD,
'run',
'deploy',
service_name,
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/cli/utils/test_cli_deploy_to_cloud_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def test_to_cloud_run_happy_path(
gcloud_args = run_recorder.get_last_call_args()[0]

expected_gcloud_command = [
"gcloud",
cli_deploy._GCLOUD_CMD,
"run",
"deploy",
"svc",
Expand Down