php please update fails with League\Flysystem\FileExistsException
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):
- Statamic Version 2.11.14
- Fresh Install or Upgrade: Upgrade
- OS: macOS 10.14.6
- Browser: N/A
- Web Server: Valet
- PHP Version: 7.1 (homebrew)
- Addons installed: None
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/[email protected]/7.1.32_1/share/[email protected]/pear') in /Users/ahammes/dev/dufresne-sprint/statamic/vendor/composer/autoload_real.php on line 66
I temporarily closed the issue because Github ate my description, but it's all good now! Hoping there's an easy fix :-)
I've never seen this issue before. Do you have any custom addons installed? Any other customizations in that repo you're cloning?
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.