Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vultr-cli crashes inside cloud-init #277

Open
mercymantis opened this issue Jul 21, 2022 · 1 comment
Open

Vultr-cli crashes inside cloud-init #277

mercymantis opened this issue Jul 21, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mercymantis
Copy link

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.

@mercymantis mercymantis added the bug Something isn't working label Jul 21, 2022
@optik-aper
Copy link
Member

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.

@optik-aper optik-aper self-assigned this Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants