Queue daemon crashes with unbound GITEA_TOKEN variable #160
Reference in New Issue
Block a user
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?
Bug
When the queue daemon runs
cmd_continue, it fails withGITEA_TOKEN: unbound variablebecause the subshell does not inherit the variable from the parent shell.Root Cause
cmd_continueuses:The subshell cannot expand
${GITEA_TOKEN:-}because the variable is not set in the daemon's environment.Fix
Source
~/.kugetsu/env/pm-agent.envat daemon startup soGITEA_TOKENis available. The daemon currently only sourcesdefault.envwhich doesn't contain the token.