CircleCI-Public / gcp-cli-orb

Install and configure the Google Cloud CLI (gcloud)
https://circleci.com/orbs/registry/orb/circleci/gcp-cli
MIT License
9 stars 32 forks source link

Install fails on host without passwordless sudo #57

Closed Gentoli closed 1 year ago

Gentoli commented 1 year ago

Orb version

v2.4.1

What happened

https://github.com/CircleCI-Public/gcp-cli-orb/blob/66dafec43c21736ed697380ad78311390b39fe2e/src/scripts/install.sh#L21 cleanup fails on image without passwordless sudo.

----------------------------------------------------------------------------------------------------
this is a machine executor job, replacing default installation of gcloud CLI
----------------------------------------------------------------------------------------------------
[sudo] password for cnb: 

Expected behavior

The orb can attempt to cleanup but should not error when cleanup fails.

In this case, /opt/google-cloud-sdk don't even exist.

EricRibeiro commented 1 year ago

@Gentoli, can you confirm if you still have this issue in v3.0.0? It still relies on sudo, but the installation process differs. If your problem wasn't solved, I'll look into it.

Gentoli commented 1 year ago

Thanks, tested on 3.0.1, it does not try to sudo anymore 🎉