Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitDiffFileProvider: execute single program processes to allow errored exits to be caught #1720

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

Slamdunk
Copy link
Contributor

@Slamdunk Slamdunk commented Aug 24, 2022

This PR:

  • Covered by tests

Fixes #1719

When git is not installed in the system

Before

$ vendor/bin/infection --git-diff-lines

 [OK] No files in diff found, skipping mutation analysis.

After

$ vendor/bin/infection --git-diff-lines

In Process.php line 267:

  The command "'git' 'diff' 'origin/master' '--diff-filter' 'AM' '--name-only' '--' 'src'" failed.

  Exit Code: 127(Command not found)

  Working directory: /my-repo

  Output:
  ================


  Error Output:
  ================
  sh: 1: exec: git: not found

@Slamdunk Slamdunk changed the base branch from master to 0.26 August 24, 2022 13:11
Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this, makes sense.

I'm not sure what's wrong with GH actions, probably because of retargeting to 0.26? Could you please target to master again? I will enable auto-merge

@maks-rafalko maks-rafalko enabled auto-merge (squash) August 24, 2022 14:48
auto-merge was automatically disabled August 25, 2022 05:52

Head branch was pushed to by a user without write access

@sanmai
Copy link
Member

sanmai commented Aug 25, 2022

There are some required checks for PHP 7.4, we should probably disable in settings.

@maks-rafalko
Copy link
Member

There are some required checks for PHP 7.4, we should probably disable in settings.

you are right, branch requirements for 0.* were different in comparison to master. Updated.

Than you @Slamdunk and @sanmai

I will make a release in the following days.

@maks-rafalko maks-rafalko merged commit 720172d into infection:0.26 Aug 25, 2022
@Slamdunk Slamdunk deleted the errexit branch August 25, 2022 09:17
@maks-rafalko
Copy link
Member

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.

GitDiffFileProvider: it doesn't fail if git is not installed
3 participants