2017-07-15 143 views
1

https://cloud.google.com/sdk/docs/quickstart-mac-os-x安裝Google Cloud SDK,rc文件的路徑是什麼?

我下載的焦油,並運行install.sh

接下來,我得到這個消息,但是我沒有看到任何RC/rc文件?

To update your SDK installation to the latest version [162.0.1], run: 
$ gcloud components update 


Modify profile to update your $PATH and enable shell command 
completion? 

Do you want to continue (Y/n)? y      

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment. 

Enter a path to an rc file to update, or leave blank to use 
[/Users/leongaban/.zshrc]: 

enter image description here

回答

3

萊昂,雲SDK安裝程序爲您提供一個選項更新$PATH以及安裝殼完成在雲SDK命令。這是通過在您的shell啓動腳本中添加幾行(通常稱爲rc文件)完成的。

  • 由於您選擇y這一步向前走,安裝程序要求爲rc文件(即shell啓動腳本)的位置。
  • 它檢測到您使用zsh,因此它給你默認的選項來更新這個文件/Users/leongaban/.zshrc
  • 反之,如果你使用bash你必須指定類似/Users/leongaban/.bashrc

你也可以在上一步選擇n和更新$PATH和/或殼完成手動過。

+0

嗯,我看到它在我的zsh配置'export GOOGLE_SDK_PATH =「/ Users/leongaban/projects/GoogleSDK」' –