sebastianfeldmann/cli

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

Opened this issue · 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.

Good question :)
Maybe an ini setting or something?