statamic / v2-hub

Statamic 2 - Feature Requests and Bug Reports
https://statamic.com
95 stars 5 forks source link

php please update fails with League\Flysystem\FileExistsException #2463

Open adamhammes opened 5 years ago

adamhammes commented 5 years ago

Describe the bug

When running php please update I get the following error:

C02VR0PYHTD5:statamic-base ahammes$ php please update

Determining the latest version of Statamic...
Latest version is 2.11.15

Updating from Statamic 2.11.14 to 2.11.15

Backing up...
Creating a folder to place backups in.
Creating a zip file...
Adding files to the zip...
Writing the zip to disk...
[✓] Backup saved to local/temp/backup/statamic-2.11.14-1573836581.zip

Getting a copy of Statamic...
Downloading a fresh copy of Statamic...
   16.93 MB / 16.93 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Extracting the zip into a temporary location...
[✓] Extraction complete.

Updating dependencies...
[✓] Dependencies updated.

Swapping files...
Deleting old files...
    10.08 KB/10.08 KB [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
Copying new files...
     4.50 KB/6.46 KB [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]  69%

  [Exception]                             
  Couldn't copy the new statamic folder.  

  [League\Flysystem\FileExistsException]                                          
  File already exists at path: statamic/vendor/mtdowling/jmespath.php/bin/jp.php

To Reproduce

$ git clone https://git.cortex.ninja/ahammes/statamic-base
$ cd statamic-base
$ (cd statamic/ && php composer.phar install)
$ php please update

Expected behavior

The update completes without error.

Environment details (please complete the following information):

Additional context

I am able to update by using the console and then running rm -rf statamic/vendor && (cd statamic/ && php composer.phar install). The command is necessary otherwise I have this error:

Warning: require(/Users/ahammes/dev/dufresne-sprint/statamic/vendor/symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in /Users/ahammes/dev/dufresne-sprint/statamic/vendor/composer/autoload_real.php on line 66
Fatal error: require(): Failed opening required '/Users/ahammes/dev/dufresne-sprint/statamic/vendor/composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='.:/usr/local/Cellar/php@7.1/7.1.32_1/share/php@7.1/pear') in /Users/ahammes/dev/dufresne-sprint/statamic/vendor/composer/autoload_real.php on line 66
adamhammes commented 5 years ago

I temporarily closed the issue because Github ate my description, but it's all good now! Hoping there's an easy fix :-)

jackmcdade commented 4 years ago

I've never seen this issue before. Do you have any custom addons installed? Any other customizations in that repo you're cloning?

nelo-digitalagentur commented 4 years ago

I ran into this issue when upgrading statamic 2.11.15 to 2.11.17. As a workaround i downloaded the ZIP manually, deleted the /statamic folder and used the one from the ZIP.