Sitelet https://github.com/casey/just/issues/3592
Skip to content

Consider adding a setting which causes backticks and shell() calls to execute during --dry-run #3592

Description

@casey

Apropos of #3586.

Currently, --dry-run causes just to skip running recipes, backticks, and shell() calls. Backticks and shell calls evaluate to a string containing the command. This can cause problems when the these values are used in other expressions, for example, bool() which can error on unexpected input, halting the run.

For example, running foo in this justfile will fail during --dry-run:

foo bar=bool(`echo 1`):

Since the backtick will evaluate to the string:

"`echo 1`"

Which is an error to pass to bool.

We could introduce a setting which caused backticks and shell() calls to run, even during --dry-run, so avoid this issue. It would have to be opt-in, since users may be relying on --dry-run not running such commands.

This feels perhaps a little too niche to be worth it, but I wanted to create this issue to collect feedback.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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