lets-cli/lets

Deduplicate depends

Opened this issue · 0 comments

Problem:

If commands have duplicate nested depends we will execute them all, for example:

commands:
  build-image: docker build -f Dockerfile .
  build-all:
    depends: [build-image]

  run:
    depends: [build-image, build-all]
   cmd: npm run dev

In the example above we will run build-image twice - once run:build-image and second run:build-all:build-image

Solution:

We can try to de-duplicate depends on config parse step since we know want command chain will be executed.