ionos-cloud / ionosctl

The IONOS Cloud CLI (ionosctl) gives the ability to manage IONOS Cloud infrastructure directly from Command Line.
Apache License 2.0
30 stars 6 forks source link

Environment variables are no longer recognized #217

Closed avorima closed 2 years ago

avorima commented 2 years ago

Description

201 introduced a regression that use of ionosctl with environment variables. This has caused failed workflows in our project.

Environment variables must be used if they are defined. Please take more care when merging things.

How to Reproduce

With version 6.3.3:

$ IONOS_USERNAME=test IONOS_PASSWORD=test ionosctl datacenter list
Error: 401 Unauthorized {
  "httpStatus" : 401,
  "messages" : [ {
    "errorCode" : "315",
    "message" : "Unauthorized"
  } ]
}

With version 6.4.0:

$ IONOS_USERNAME=test IONOS_PASSWORD=test ./builds/ionosctl_linux_amd64 datacenter list
Error: error getting credentials: nor $IONOS_USERNAME, $IONOS_PASSWORD, $IONOS_TOKEN set, nor config file: stat /home/mv/.config/ionosctl/config.json: no such file or directory

Additional Notes

This feature needs a regression test so it doesn't get removed again.

avirtopeanu-ionos commented 2 years ago

Hi, we already are working on a fix for this issue! You can expect a hotfix release by EOD

avorima commented 2 years ago

I already have a fix and working on a regression test. expect a PR within the hour

avorima commented 2 years ago

Fixed by https://github.com/ionos-cloud/ionosctl/pull/216