AcademySoftwareFoundation / AcademySoftwareFoundation/rez
let rez-context detect sourced context
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 369
- Avg merge
- 12d 3h
- Merged PRs (30d)
- 5
Description
Sometimes rez is used to configure the current env, rather than a subshell. That can be done like so:
source <(rez-env -o - | rez-context -i -);
Currently rez-context will fail in this env. Instead, it should still show what info it can (and there's still a lot that can be retrieved from the REZ_* envvars).
Note that this will have to be enabled with a new flag (--from-env or similar), since existing bash code could be using return code from rez-context to detect if a context is active, and we don't want to break backwards compatibility.
Contributor guide
Research direction
Start with the rez-context command and reproduce the failure using the sourced command shown in the issue. Trace how it handles the REZ_* environment variables and define the new --from-env behavior. Done means it reports available context information from the environment while preserving existing return-code behavior without the flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100