Skip to content

feat: Usage with working directory #29

@theofidry

Description

@theofidry

When executing the plugin, we see in the output the command used:

<interpreter> <interpreter-options> <infectionExecutable> run <testRunnerOption> <extraOptions>

It is not clear to the user:

  • What working directory is used when executing the command without Command Line -> Custom working directory configured. Maybe instead of an empty value it could have the default value used as a placeholder? (assuming it is not a random path made up on the fly for the execution – otherwise I would propose to select the root of the project as the default and display that as the placehodler).
  • In the output, I would add a log entry Executed from: $(pwd) or write a cd $(pwd).
  • Given the custom working directory is configured, I would attempt to make the paths relative to the working directory for readability:
/Users/my-user/path/to/php-8.5/bin/php /Users/my-user/long-path/to/infection run --configuration /Users/my-user/long-path/to/project/infection.json5

Is a bit unnecessarily verbose. To avoid any edge case though I would only do so if the canonical absolute path contains the (canonical absolute) current working directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions