On some platforms, the gcloud command is provided by a binary named something other than gcloud (e.g. gcloud.com on Windows).
For those platforms, using subprocess to run the command without the shell=True argument will fail because there is no file named gcloud.
Instead, we need to pass in the shell=True argument so that the call to subprocess first resolves which binary corresponds to the gcloud command and then runs that binary.
On some platforms, the
gcloud
command is provided by a binary named something other thangcloud
(e.g.gcloud.com
on Windows).For those platforms, using subprocess to run the command without the
shell=True
argument will fail because there is no file namedgcloud
.Instead, we need to pass in the
shell=True
argument so that the call to subprocess first resolves which binary corresponds to thegcloud
command and then runs that binary.