You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When importing a gzipped sql file using sql:query --file=../dump.sql.gz, drush extracts the file then crashes with File(s) not found: dump.sql.
To Reproduce
Place a gzipped sql file (dump.sql.gz) in the directory above Drupal root.
Run drush sql:query --file=../dump.sql.gz. Note that the file path starts with ../ to point to the directory above Drupal root.
Expected behavior
Drush extracts and runs the sql file.
Actual behavior
Drush extracts the file but fails to run it.
System Configuration
Q
A
Drush version?
12.1.1
Drupal version?
10.1.0
PHP version
8.1
OS?
Linux
The text was updated successfully, but these errors were encountered:
if ($process->isSuccessful()) {
$input_file = trim($input_file, '.gz');
}
trim($input_file, '.gz') means the characters ., g and z will be trimmed from both ends of the string. So if the given path starts with ../, thd dots will be trimmed from the beginning.
phparkle
added a commit
to phparkle/drush
that referenced
this issue
Jul 6, 2023
Describe the bug
When importing a gzipped sql file using
sql:query --file=../dump.sql.gz
, drush extracts the file then crashes withFile(s) not found: dump.sql
.To Reproduce
drush sql:query --file=../dump.sql.gz
. Note that the file path starts with../
to point to the directory above Drupal root.Expected behavior
Drush extracts and runs the sql file.
Actual behavior
Drush extracts the file but fails to run it.
System Configuration
The text was updated successfully, but these errors were encountered: