-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
incus CLI breaks if HOME is invalid #422
Comments
@stefanor note that you can use |
Incus actually does fetch the user's home directory from /etc/passwd but only if the env variable isn't set. If HOME is set, then it's expected to exist. |
Closes lxc#422 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
I've changed our logic a bit to validate that the home directory actually exists at every step. |
That sounds a lot more robust, thanks! |
Required information
incus info output
Issue description
If HOME is set to something nonexistent, then the
incus
CLI will fail, because it can't write.config
.sbuild
sets this, which breaks incus-backed sbuild.Does
incus
need to write.config
? Could it fail to write the config gracefully? Or fall back to extracting the home directory from the users database, if HOME is nonexistent?Relevant config finding code is here:
incus/cmd/incus/main_aliases.go
Lines 162 to 175 in e569070
Steps to reproduce
$ HOME=/nonexistent incus ls
The text was updated successfully, but these errors were encountered: