Unable to set version without file with search-api-solr:get-server-config

Created on 2 November 2023, about 1 year ago

Setup

  • Solr version:8
  • Drupal Core version:10
  • Search API version:latest
  • Search API Solr version:latest

Issue

When using `drush search-api-solr:get-server-config` you are unable to set the solr_version if you want to combine it with --pipe.
The file_name argument is before the solr_version argument.

When you try to go arround it by using an empty string arg, it will error-out at ```ValueError: Path cannot be empty in /var/www/html/app/modules/contrib/search_api_solr/src/Utility/SolrCommandHelper.php on line 86```
`drush search-api-solr:get-server-config default "" 8 --pipe | busybox unzip`

Proposed fix:
Extend the null check to also check for emtpy strings. So commandline usage will be affected the least.

🐛 Bug report
Status

Active

Version

4.3

Component

Code

Created by

🇳🇱Netherlands MakerTim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024