vultr-cli icon indicating copy to clipboard operation
vultr-cli copied to clipboard

[BUG] CLI disregards --config and fails

Open alexgmathews opened this issue 1 year ago • 1 comments
trafficstars

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

alexgmathews avatar Nov 18 '24 18:11 alexgmathews

Relates to #478

optik-aper avatar Mar 04 '25 22:03 optik-aper