mottosso / bleeding-rez

Rez - Reproducible software environments for Windows, Linux and MacOS
GNU Lesser General Public License v3.0
71 stars 10 forks source link

--self #81

Open mottosso opened 5 years ago

mottosso commented 5 years ago

Goal

Facilitate easy exposure of the bleeding-rez commands from within a context.

Motivation

With --isolated, the parent environment is emptied from any references to the original rez command, but in some cases having those be present is useful, e.g. for use with --patch, --context and --graph.

We could simply add it to the request.

$ rez env bleeding_rez
> $ rez env --graph

However that's a lot to type and worse yet it may include a version that differs from the parent which may affect its ability to operate on the surrounding context and .rxt file, if e.g. the schema has changed.

Implemenation

Address the above issues with a --self argument, which would expand into bleeding_rez, including the version used to establish the context.

# bleeding_rez-2.40.0
$ rez env
> $ rez
# Command not found
> $ exit
$ rez env --self
> $ rez --version
# 2.40.0