Skip to content

bug: The wp, exec and logs commands do not accept flags for the container #4

Closed

Description

@nabil1440

Blocker: yes. Fix this before the server-monitoring work starts.

Defect

Test results:

  • fly wp plugin list --format=json shows Error: unknown flag: --format.
  • fly exec php ls -la shows Error: unknown shorthand flag: 'l' in -la.
  • fly logs -f shows unknown shorthand flag: 'f'.
  • fly logs -- -f follows the logs of all containers. The README does not show this.
  • fly logs -- -f php shows accepts at most 1 arg(s). Thus, a user cannot follow the logs of one container.
  • -- is a workaround for wp and exec. The README does not show it.

Related defect:

Cost

  • WP-CLI is the most frequent daily task. Most WP-CLI commands with flags do not operate.
  • Users must know about --. The documentation does not tell them.
  • During an incident, users cannot follow the logs of one container.
  • On OpenLiteSpeed sites, fly exec without a service name does not operate.

Benefit of the fix

  • WP-CLI and container commands operate with their usual flags.
  • Users can follow the logs of one container.
  • fly exec operates on PHP sites and on OpenLiteSpeed sites.

Fix

  1. Call Flags().SetInterspersed(false) on wp and exec. Then, all arguments after the first positional argument go to the container. --domain must come before them.
  2. For logs, add -f/--follow and --tail. As an alternative, send the arguments to Docker Compose without change.
  3. For exec, select the default service with the same detection as wp (getContainerName).

Completion checks

  • The first three commands in "Defect" operate.
  • fly --domain example.com wp plugin list --format=json operates.
  • fly exec ls on an OpenLiteSpeed site uses the openlitespeed service.
  • Tests for these items.

Activity

  1. self-assigned this
    on Sep 21, 2026
  2. added a commit that references this issue on Sep 22, 2026
    19d14c7
  3. changed the title [-]The wp, exec and logs commands do not accept flags for the container[/-] [+]bug: The wp, exec and logs commands do not accept flags for the container[/+] on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions