Skip to content

Feature request: Recursive --dry-run #3341

@jakub-borusewicz

Description

@jakub-borusewicz

Hello, I was trying to refactor my recipes recently, and I find it very hard to do without worrying if they still work as expected. So I figured that it would be great to be able to test the recipes, using bats https://github.com/bats-core/bats-core, by running just --dry-run <recipe> and checking comparing it against expected output, to verify that the actual command that is run didn't change despite changes in the recipes structure.

Problem is that if I want to delegate some logic common to multiple recipes to some shared recipe that could be reused, when I use recipe inside the other recipe, the --dry-run does not echo the content of nested recipe, instead it just echoes the just call as it is, which pretty much negates viability of this approach.

So, how I imagine it could work, for examplary jusffile:

some_recipe param:
    echo "call1 {{param}}"

some_recipe2 param:
    just some_recipe {{param}}
    echo "call2 {{param}}"

state right now:

> just --dry-run some_recipe2 foo

just some_recipe foo
echo "call2 foo"

How I would like it to work:

> just --dry-run-recursive some_recipe2 foo

echo "call1 foo"
echo "call2 foo"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions