It appears that composer cannot install this module on a Windows machine anymore (beta3 worked fine). From what I read this appears to be because of modules/csv_example/tests/fixtures/images/Zip Care*.jpeg.
I assume that Windows does not really like the asterisk in the filename. I can however not test this because WinRar sanitizes the name and converts it to Zip Care_.jpeg.
Does that file really require the asterisk and can other Windows users confirm the issue?
composer update
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating drupal/commerce_migrate (2.0.0-beta3 => 2.0.0-beta4): Downloading (100%) Update failed (There was an error extracting the ZIP file, it is either corrupted or using an invalid format.)
Would you like to try reinstalling the package instead [yes]?
- Removing drupal/commerce_migrate (2.0.0-beta3)
- Installing drupal/commerce_migrate (2.0.0-beta4): Downloading (100%)
Failed to download drupal/commerce_migrate from dist: There was an error extracting the ZIP file, it is either corrupted or using an invalid format.
Now trying to download from source
- Installing drupal/commerce_migrate (2.0.0-beta4): Cloning 8.x-2.0-beta4 from cache
8.x-2.0-beta4 is gone (history was rewritten?)
[RuntimeException]
Failed to execute git checkout "8.x-2.0-beta4" -- && git reset --hard "8.x-2.0-beta4" --
error: unable to create file modules/csv_example/tests/fixtures/images/Zip Care*.jpeg: Invalid argument
Note: checking out '8.x-2.0-beta4'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 689670b Issue #2975203 by quietone, heddn: Move the commerce_export CSV source to new submodule
error: unable to create file modules/csv_example/tests/fixtures/images/Zip Care*.jpeg: Invalid argument
fatal: Could not reset index file to revision '8.x-2.0-beta4'.
Comments
Comment #2
quietone commentedYes, it does look like the asterisk is the cause of the problem. It is a reserved, according to https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file
Sorry about that patch coming.
Comment #3
quietone commentedThis patch will rename the file, removing the asterisk.
I don't have access to a Windows environment so it would be very helpful is someone can confirm this fixes the problem.
Comment #5
quietone commentedOops, didn't update the tests. Silly me.
Comment #6
neograph734Thanks for the fast reply. Much appreciated.
I think this is step in the good direction as different zip programs might sanitize the asterisk differently, resulting in unpredictable test results. That issue is covered.
I can however not verify that composer works, because it pulls the data directly from the source. In order to test this, you will have to push the change to the repo first.
Comment #8
quietone commented@Neograph734, your welcome.
The changes have been committed. I'm leaving this at Needs Review until testing confirms all is well now.
Comment #9
neograph734After enforcing the -dev build in composer all is working again as expected. So this is theoretically fixed.
However you might want to keep the issue open until you are ready to tag a new release (as people who do not enforce the dev build in composer are likely to run into this sooner or later).
Comment #10
quietone commented@Neograph734, thank you for reporting this and testing! OK, let's keep this open as the next release won't happen for another 4 weeks.
Comment #11
quietone commentedRetesting
Comment #13
quietone commentedOops forgot this was commited. Closing now in preparation for a new release in the next 24 hours.