The following command will give you the information you're looking for:
$ gcloud info --format="value(installation.sdk_root)" /path/to/google-cloud-sdk/
You need to append
You also have lots of other paths available:
installation.sdk_root, and so on. Look at the output of
gcloud info --format=json for all available properties to query.
dirname $(which gcloud)
And worked like a charm