CdScope
A cd that optionally restores the previous directory.
Usage
CdScope()Returned by RunBuilder.cd. As a bare statement it just changes directory. As a with block it appends cd - on exit, so later commands resume where they were.
Parameter Attributes
builder: RunBuilderpath: str
Example
with r.cd(“/src/build”): … r.make(“install”) … # cd /src/build && make install && cd -