[GH-ISSUE #1844] Document cli flag usage #892

Open
opened 2026-03-01 21:47:13 +03:00 by kerem · 1 comment
Owner

Originally created by @uuf6429 on GitHub (Jun 5, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1844

Act version

0.2.46

Feature description

As far as I know, the only documentation of available flags is from running act --help.

This is not bad in itself - it's easier to maintain.

The problem, however, is that the real usage is barely documented. For example:

  -p, --pull                                              pull docker image(s) even if already present (default true)
  • why is that flag needed, if it is enabled by default (why not --no-pull?)
  • how can one disable it? I think I correctly guessed --pull=false?

Even worse with matrix:

      --matrix stringArray                                specify which matrix configuration to include (e.g. --matrix java:13
  • what the heck is a stringArray in cli terms??
  • I couldn't get it to work: --matrix xx:11 yy:22, --matrix=xx:11,yy:22, --matrix xx:11,yy:22
  • btw, the text is missing the final bracket

I propose to either:

  • show more complete examples (such as the --pull=false case)
  • OR mentioning these details in the beginning:

    To disable a flag, use --flag=false
    In case of stringArray .....

Originally created by @uuf6429 on GitHub (Jun 5, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1844 ### Act version 0.2.46 ### Feature description As far as I know, the only documentation of available flags is from running `act --help`. This is not bad in itself - it's easier to maintain. The problem, however, is that the real usage is barely documented. For example: ```text -p, --pull pull docker image(s) even if already present (default true) ``` - why is that flag needed, if it is enabled by default (why not `--no-pull`?) - how can one disable it? I think I correctly guessed `--pull=false`? Even worse with matrix: ```text --matrix stringArray specify which matrix configuration to include (e.g. --matrix java:13 ``` - what the heck is a `stringArray` in cli terms?? - I couldn't get it to work: `--matrix xx:11 yy:22`, `--matrix=xx:11,yy:22`, `--matrix xx:11,yy:22` - btw, the text is missing the final bracket I propose to either: - show more complete examples (such as the `--pull=false` case) - OR mentioning these details in the beginning: > To disable a flag, use --flag=false > In case of stringArray .....
Author
Owner

@ChristopherHX commented on GitHub (Jun 5, 2023):

  • why is that flag needed, if it is enabled by default (why not --no-pull?)

For backward compatibility reasons is --pull now on by default, otherwise everyone not updating the default images manually would see node not found issues. The whole old PATH handling has been replaced.
If we would rename a flag in a patch release of act, everyone writing act --pull will see an error.

I agree for act 0.3.x we should replace it with --no-pull.

Yes I agree the cli help doesn't provide detailed help how to specify options https://github.com/spf13/cobra

<!-- gh-comment-id:1576358194 --> @ChristopherHX commented on GitHub (Jun 5, 2023): > * why is that flag needed, if it is enabled by default (why not `--no-pull`?) For backward compatibility reasons is `--pull` now on by default, otherwise everyone not updating the default images manually would see `node` not found issues. The whole old `PATH` handling has been replaced. If we would rename a flag in a patch release of act, everyone writing `act --pull` will see an error. I agree for act 0.3.x we should replace it with `--no-pull`. Yes I agree the cli help doesn't provide detailed help how to specify options <https://github.com/spf13/cobra>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#892
No description provided.