Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2394b0be9 | ||
|
|
ebcd4dbf3d |
@@ -11,6 +11,10 @@ builds:
|
|||||||
binary: cli-proxy-api
|
binary: cli-proxy-api
|
||||||
archives:
|
archives:
|
||||||
- id: "cli-proxy-api"
|
- id: "cli-proxy-api"
|
||||||
|
format: tar.gz
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
files:
|
files:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- README.md
|
- README.md
|
||||||
|
|||||||
@@ -844,11 +844,11 @@ func (c *Client) CheckCloudAPIIsEnabled() (bool, error) {
|
|||||||
if err.StatusCode == 403 {
|
if err.StatusCode == 403 {
|
||||||
errJSON := err.Error.Error()
|
errJSON := err.Error.Error()
|
||||||
// Check for a specific error code and extract the activation URL.
|
// Check for a specific error code and extract the activation URL.
|
||||||
if gjson.Get(errJSON, "error.code").Int() == 403 {
|
if gjson.Get(errJSON, "0.error.code").Int() == 403 {
|
||||||
activationURL := gjson.Get(errJSON, "error.details.0.metadata.activationUrl").String()
|
activationURL := gjson.Get(errJSON, "0.error.details.0.metadata.activationUrl").String()
|
||||||
if activationURL != "" {
|
if activationURL != "" {
|
||||||
log.Warnf(
|
log.Warnf(
|
||||||
"\n\nPlease activate your account with this url:\n\n%s\n And execute this command again:\n%s --login --project_id %s",
|
"\n\nPlease activate your account with this url:\n\n%s\n\n And execute this command again:\n%s --login --project_id %s",
|
||||||
activationURL,
|
activationURL,
|
||||||
os.Args[0],
|
os.Args[0],
|
||||||
c.tokenStorage.ProjectID,
|
c.tokenStorage.ProjectID,
|
||||||
|
|||||||
Reference in New Issue
Block a user