mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: Remove the 'HOME' var from hook_exec env, because it's often defined in CLI but not in API because yunohost-api runs in a systemd service
This commit is contained in:
parent
a399675f60
commit
f43e567bf0
1 changed files with 6 additions and 0 deletions
|
@ -439,6 +439,12 @@ def _hook_exec_bash(path, args, chdir, env, user, return_format, loggers):
|
|||
_env = os.environ.copy()
|
||||
_env.update(env)
|
||||
|
||||
# Remove the 'HOME' var which is causing some inconsistencies between
|
||||
# cli and webapi (HOME ain't defined in yunohost-api because ran from systemd)
|
||||
# Apps that need the HOME var should define it in the app scripts
|
||||
if "HOME" in _env:
|
||||
del _env["HOME"]
|
||||
|
||||
returncode = call_async_output(command, loggers, shell=False, cwd=chdir, env=_env)
|
||||
|
||||
raw_content = None
|
||||
|
|
Loading…
Add table
Reference in a new issue