lets-cli/lets

Add new env mode - ref

Opened this issue · 1 comments

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 and b declares envs that a:env:B depends on b and b:env:A depends on a
  • 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 ?

#89 related