composer icon indicating copy to clipboard operation
composer copied to clipboard

Can't download from source because `svn` not in path

Open taupecat opened this issue 2 years ago • 3 comments

I'm using this action to install WordPress plugins via composer using wpackagist.org. Today I ran into an issue where the ZIP distribution file was not available (so yes, there's a problem with this package and/or wpackagist, which is a separate issue…), so composer tries to download from source. WordPress being what it is, that source is SVN. But this action chokes because svn isn't in the path. Here's a truncated version of the output:

  - Downloading wpackagist-plugin/google-sitemap-generator (4.1.7)
    Failed to download wpackagist-plugin/google-sitemap-generator from dist: The "https://downloads.wordpress.org/plugin/google-sitemap-generator.4.1.7.zip" file could not be downloaded (HTTP/2 404 )
    Now trying to download from source

Error: svn was not found in your PATH, skipping source download
In SvnDownloader.php line 39:
                                                            
  svn was not found in your PATH, skipping source download  
                                                            

install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]

Error: Process completed with exit code 1.

Any help on this is greatly appreciated. Thank you.

taupecat avatar Nov 25 '22 14:11 taupecat

Hi, this is simply down to the Github Actions container not having SVN installed, because when I set it up I never anticipated such use. I will add SVN to the next release of php-build and hopefully that will solve your issue.

I'll contact you on here when I've found some time to do this, with a snippet to use in your workflow to test the new functionality.

g105b avatar Nov 25 '22 14:11 g105b

That sounds great, thanks so much.

And I totally hear you on the "never anticipated such use." Is there any project out there the size and scale of WordPress that still uses svn? I think not.

taupecat avatar Nov 25 '22 14:11 taupecat

No, but Wordpress was first released in 2003, Git was released in 2005 - so fair play to them :)

g105b avatar Nov 25 '22 14:11 g105b