comby-tools/comby

Error patching cpp when -review is used

UJAM-JH opened this issue · 3 comments

Describe the bug
Comby fails on certain files if the -review option is used

Reproducing

  • If this is not about a matcher, please describe the bug:
    save this as comby.cpp:

void test() {
  someFunc(testA, testC, testB);
}

and run this command: DEBUG_COMBY=1 comby -review 'someFunc(:[1], :[2], :[3])' ':[1] = someOtherFunc(:[3], :[2])' comby.cpp and then accept the change. Result:

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).

Expected behavior
It should patch after accepting the change

Additional context
comby 1.8.1, running on macOS.
Using the -in-place option works as expected

thanks, eyeballing, looks like -review should imply -in-place and that's not happening--will look into fixing :-)

Is it possible this is a duplicate of #356?

No, the files I ran comby on did not have any spaces in the path or filename