Gab*_*vay 17 bash google-cloud-platform gcloud gcloud-cli
我需要在中添加Google Cloud SDK PATH.所以我需要安装到哪里的路径.有没有gcloud ...给我这个信息的命令?
如果不是,我必须通过符号链接which gcloud等.
这个问题的任何清洁解决方案?
Zac*_*man 37
以下命令将为您提供所需的信息:
$ gcloud info --format="value(installation.sdk_root)"
/path/to/google-cloud-sdk/
Run Code Online (Sandbox Code Playgroud)
你需要追加/bin.
您还有许多其他路径可用:config.paths.global_config_dir,installation.sdk_root等等.查看gcloud info --format=json要查询的所有可用属性的输出.
我用了:
dirname $(which gcloud)
Run Code Online (Sandbox Code Playgroud)
像魅力一样工作