cli icon indicating copy to clipboard operation
cli copied to clipboard

After upgrading to PHP 8.0.19 from PHP 7.4.19 on Windows, escaping spaces breaks commands

Open Sotiris-k opened this issue 2 years ago • 1 comments

Hello!

Honestly I'm buffled how this happened, I upgraded PHP to 8.0 from 7.4 and suddenly the static method Util::escapeSpacesIfOnWindows($cmd) causes the commands to not be recognized.

The error thrown is

Exception 'RuntimeException' with message 'Command failed:
  exit-code: 1
  message:   '""C:\cygwin64\bin\mysqldump.exe" --user="root" --password="root" --single-transaction "something""' is not recognized as an internal or external command,
operable program or batch file.

Once I stop escaping the command manually, everything works.

How could this be possible? I made sure that nothing else changed in the system that could have caused this.

Sotiris-k avatar May 11 '22 08:05 Sotiris-k