Skip to content

aliyun version and aliyun --help can not work if ~/.aliyun/config.json is invalid. #1242

@mashenjun

Description

@mashenjun
  • Command Format: Alibaba Cloud Command Line Interface Version 3.0.290

  • Execution Command:

aliyun version
aliyun --help
  • Output:
    Neither version and --help command can work.
aliyun version
ERROR: load current configuration failed unknown profile sso, run configure to check.
aliyun configure 
ERROR: load current configuration failed unknown profile sso, run configure to check⏎ 

The ~/.aliyun/config.json is invalide beacuse I rename the current to a value that does not exist in profiles.

{
  "current": "foo",
  "profiles": [
    {
      "name": "bar"
// other fields
    },
    {
      "name": "baz"
// other fields
    },
  ],
  "meta_path": ""
}

It is kinda annoying if version and --help commands cannot work when config.json is invalid. I think a better behaviour is version and --help are always working. Besides, configure command should also work since reconfigure is the fastest way to fix config.json.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions