vultr-cli
vultr-cli copied to clipboard
[BUG] CLI disregards --config and fails
trafficstars
Steps To Reproduce
- Operating System: Debian 12 x86_64
- Vultr-CLI Binary: vultr-cli_v3.4.0_linux_amd64 installed to
/usr/local/sbin/vultr-cliwith owner/grouproot:rootand permissions700 - Configuration file placed at
/etc/vultr-cli.yamlwith contentsapi-key: 123XYZ...with owner/grouproot:rootand permissions600 - Shell Environment: bash, root user (command executed directly as root / not prefixed by
sudo) - 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...
- vultr-cli should use the defined path for configuration
- vultr-cli should not attempt reading
$HOME/.vultr-cli.yaml - the error message should give an example demonstrating
add 'api-key' to your config file
Relates to #478