Add new env mode - ref
Opened this issue · 1 comments
kindermax commented
Example:
commands:
show-users:
cmd: cat users.txt
grant-access-all:
ADMINS:
ref: show-users
We can mimic this behavior like this:
commands:
show-users:
cmd: cat users.txt
grant-access-all:
ADMINS:
sh: lets show-users
and while this does not require complex validations, it is a bit slower since requires to start new instance of lets
Validate that:
- no circular deps created
- for example command declares env var with ref to itself
- another example - two commands
a
andb
declares envs thata:env:B
depends onb
andb:env:A
depends ona
- if command uses global env that depends on the command itself
- probably do not implement
mode: ref
for global env in first iteration because it can be hard to deal with circular calls - something else ?