Skip to content

dev/sg: source files recommended by gcloud during setup

Administrator requested to merge sg-setup-gcloud-source into main

Created by: bobheadxi

gcloud emits output like this during installation it seems when it doesn't automatically add gcloud etc to your path:

==> Source [/Users/robrhyne/google-cloud-sdk/completion.zsh.inc] in your profile to enable shell command completion for gcloud.
==> Source [/Users/robrhyne/google-cloud-sdk/path.zsh.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.

This change adds a Map that watches for this type of output and applies the suggestions automatically to profile.

Test plan

Unit tests on the regexp, manually applied fixes while working on Rob's sg setup which worked.

Merge request reports

Loading