stateful / runme

DevOps Workflows Built with Markdown
https://runme.dev
Apache License 2.0
901 stars 30 forks source link

"--dry-run" doesn't work properly when using category option #606

Open ruzickap opened 4 weeks ago

ruzickap commented 4 weeks ago

Hello

The new feature introduced in https://github.com/stateful/runme/issues/369 - 'Document-level options "category"' doesn't work properly with --dry-run:

Example - let's have the following file:

Installation steps for Solution 2:

echo "[1] Install command in $PWD"
echo "[2] Install second command"
echo "Delete solution"
echo "Delete solution - second command"

If I run runme run --all --skip-prompts --category solution-2 --dry-run I got only first command in markdown document "processed":

❯ runme run --all --skip-prompts --category solution-2 --dry-run
#!/opt/homebrew/bin/bash

// run in "/tmp"

set -e -o pipefail
echo "[1] Install command in $PWD"

This bug is related to https://github.com/stateful/runme/issues/580.

Thank you for looking at it...