Improve detection/setting of the PATH environment variable
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### What needs to get done
The [current code](https://github.com/canonical/rockcraft/blob/main/rockcraft/oci.py#L392) that prevents empty PATH vars only activates on bare-based rocks; as [Cris points out](https://github.com/canonical/rockcraft/pull/725#discussion_r1793270914) we could improve this to cover any case where the PATH is empty to protect ourselves in the case of future changes or new bases.
### Why it needs to get done
The empty PATH is a security vulnerability; generalizing the detection and handling of this case improves the robustness of the code.
Evaluation history
No evaluation history available.