JUJU_HOOK_NAME does not get set
Bug #1503039 reported by
Robie Basak
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
Low
|
Unassigned | ||
juju-core |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Using 1.24.6, JUJU_HOOK_NAME (documented in https:/
However, it does seem to get set when debug-hooks is used, so this is doubly dangerous - hooks are not being debugged in the same environment that they are run normally.
I am using the manual provider.
tags: | added: charms hooks manual-provider |
Changed in juju-core: | |
status: | Triaged → Won't Fix |
no longer affects: | juju-release-tools |
Changed in juju: | |
milestone: | 2.0.1 → none |
tags: | added: helptext |
Changed in juju: | |
status: | Triaged → Fix Released |
milestone: | none → 2.8-beta1 |
To post a comment you must log in.
This appears to be a documentation failure. JUJU_HOOK_NAME is only set when running debug-hooks where the execution context is unclear. scripts can learn the hooks name using $0, ${BASH_SOURCE[0]}, or sys.argv[0] for example.