Skip to content

Avoid confusing error on reverse failure #6

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

Merged
merged 1 commit into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jamescowie/composer-patcher",
"description": "Apply patches using composer",
"license": "MIT",
"version": "1.0.2",
"version": "1.0.3",
"authors": [
{
"name": "jamescowie",
Expand Down
2 changes: 1 addition & 1 deletion src/Inviqa/Patch/Patch.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ protected function isApplied()

return $result;
} catch (\Exception $e) {
$this->getOutput()->writeln("<comment>{$e->getMessage()}</comment>");

Choose a reason for hiding this comment

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

would love to know what it currently outputs? Response wasn't helpful?

Copy link
Author

Choose a reason for hiding this comment

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

Just errors about "unreversed patch detected":

The command "patch --dry-run -p 1 -R < '/vagrant/magento/composer-patches/520-MAGETWO_58033_2_1_2_v1_composer.patch'" failed.

Exit Code: 1(General error)

Working directory: /vagrant/magento

Output:
================
checking file vendor/magento/module-configurable-product/etc/frontend/di.xml
Unreversed patch detected!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
The next patch, when reversed, would delete the file vendor/magento/module-configurable-product/Plugin/Model/ProductStatus.php,
which does not exist!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file vendor/magento/module-catalog/view/frontend/templates/product/list.phtml
Unreversed patch detected!  Ignore -R? [n]
Apply anyway? [n]
Skipping patch.
patch unexpectedly ends in middle of line
2 out of 2 hunks ignored

Choose a reason for hiding this comment

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

Argh ok!

// Ignore errors on the reverse, since it probably means it wasn't applied.
return false;
}
}
Expand Down