modmore / Gitify

Command line toolkit to make managing a MODX site in git a lot easier.
MIT License
122 stars 55 forks source link

Gitify backup won't export with spaces in target path #313

Closed robotjoosen closed 4 years ago

robotjoosen commented 4 years ago

Summary

There is an issue with Gitify backup when the targetFile path contains spaces. Possibly related to issue #172

Solution

Put double quotes around the {{targetFile}} in src/Command/BackupCommand.php

-        exec("mysqldump -u {$database_user} {$password_parameter} -h {$database_server} {$dbase} > {$targetFile} ");
+        exec("mysqldump -u {$database_user} {$password_parameter} -h {$database_server} {$dbase} > \"{$targetFile}\" ");

Environment