Skip to content

Add new flag 'shell' which outputs shell commands from a task#1135

Open
the-kaustubh wants to merge 3 commits intogo-task:mainfrom
the-kaustubh:issue-701
Open

Add new flag 'shell' which outputs shell commands from a task#1135
the-kaustubh wants to merge 3 commits intogo-task:mainfrom
the-kaustubh:issue-701

Conversation

@the-kaustubh
Copy link

The PR adds new flag --shell to the task command which works similar to dry run flag. It outputs raw shell command corresponding to the task without executing it.

Commit 2231021 also adds the same functionality to the pre-condition checks.

This PR addresses #701 Linting of commands

@q0rban
Copy link

q0rban commented Jun 17, 2024

For the purposes of passing to another linter, such as shellcheck, would this need to do some preprocessing of template variables?

@trulede
Copy link
Contributor

trulede commented May 11, 2025

It might be interesting to combine this with #2114 as a trace implementation. For instance:

task default --tracer=audit

where the "audit" prints resolved task variables, envars (send to sh) and the sh commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants