vultr-cli
vultr-cli copied to clipboard
Vultr-cli crashes inside cloud-init
The vultr-cli exits without any warnings/errors in the output or logs when run inside a cloud-init user-data script. It took me a while to figure out that it happens when the HOME environment variable is undefined.
A good solution would be to output a message so it appears in cloud-init-output.log.
Thanks for the report.
Steps to reproduce:
- download/extract a release
- export Vultr API key
unset HOME- run a command (
./vultr-cli instance list) - nothing is returned
I'll need to do some research on this since I don't see anything in our package that does use the HOME env var. Some of the vendor packages do mention it, though. When I go run main.go instance list I get this error:
build cache is required, but could not be located: GOCACHE is not defined and neither $XDG_CACHE_HOME nor $HOME are defined
But it doesn't seem like that should be an issue in the compiled binary.