comby-tools / comby

A code rewrite tool for structural search and replace that supports ~every language.
https://comby.dev
Apache License 2.0
2.38k stars 60 forks source link

`comby -review` is broken for filepaths containing spaces #356

Open lehmacdj opened 1 year ago

lehmacdj commented 1 year ago

Describe the bug When running comby -review to make a change to files where their filepath contains spaces after accepting a change comby fails with the error:

[debug] File to patch: No file found--skip this patch? [y] 1 out of 1 hunks ignored--saving rejects to Oops.rej
,
Error attempting patch, command exited with 1.
Run the command again with DEBUG_COMBY=1 set in the environment for more info.
Press any key to continue, or exit now (Ctrl-C).

Reproducing Please see this repository that contains a reproduction of the bug, and detailed instructions for reproducing it: https://github.com/lehmacdj/comby-bug-spaces-in-filename-broken

Expected behavior After accepting the change, the change should be applied exactly as though comby -in-place were used instead.

Additional context I am using version 1.8.1 of comby which is the latest release

rvantonder commented 1 year ago

Thanks for the clear reproduction instructions ❤️ . I'll look into this