Nonexistant environment variable HOME #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First, thanks for this plugin, I installed it on Icinga.
I just had a small issue: the HOME env variable used in ianardap.py:24 is not provided by Icinga 2.13 (at least in my installation), triggering an exception:
I applied the following diff:
I created the directory and chown’ed it to the right user, it works.
Resolution:
Indeed, it works for me because I set HOME in the systemd configuration file:
IMHO, applications should be able to rely on HOME. I don't like the idea of having a hardwired home in the script itself, Icinga should do it, either automatically or through systemd (or, as you mentioned, through the env variable).
I aggree about the hardcoded value.
I will propose a pull request using "$XDG_CACHE_HOME/ianardap" if XDG_CACHE_HOME is set, else "$HOME/.ianardapcaches" if HOME is set, else no cache file with a loud warning to encourage users to set a cache. This might be changed if you prefer.
So the pull request is linked, but I have an HTTP error 500 when I open #5 when logged in, no error when I’m logged out.
This Gitea bug has been reported to the admin.
I also reported it yesterday – sorry I didn’t mention it – and a workaround is working for me (activate the PR on my fork). pilou- added this comment on Gitea.
I assume that PR #5 fixed the issue.