Skip to content

[BUG] CLI disregards --config and fails #490

@alexgmathews

Description

@alexgmathews

Steps To Reproduce

  1. Operating System: Debian 12 x86_64
  2. Vultr-CLI Binary: vultr-cli_v3.4.0_linux_amd64 installed to /usr/local/sbin/vultr-cli with owner/group root:root and permissions 700
  3. Configuration file placed at /etc/vultr-cli.yaml with contents api-key: 123XYZ... with owner/group root:root and permissions 600
  4. Shell Environment: bash, root user (command executed directly as root / not prefixed by sudo)
  5. Command: $ vultr-cli account --config /etc/vultr-cli.yaml

Error Message

Error Reading in file: /root/.vultr-cli.yaml
Error:
Please export your VULTR API key as an environment variable or add 'api-key' to your config file, eg:
export VULTR_API_KEY='<api_key_from_vultr_account>'

Expected behavior
If the --config flag is defined...

  1. vultr-cli should use the defined path for configuration
  2. vultr-cli should not attempt reading $HOME/.vultr-cli.yaml
  3. the error message should give an example demonstrating add 'api-key' to your config file

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions