On 12-11-25 06:42 AM, Colomban Wendling wrote:
Le 25/11/2012 11:32, Lex Trotman a écrit :
On 25 November 2012 21:11, barz040@yahoo.it barz040@yahoo.it wrote:
Try running it same as the Geany version from the command line, ex: $ echo "Some PHP Code Here" | php_beautifier -s4 -l "..." or $ cat "some-code-file.php" | php_beautifier -s4 -l "..."
done. Both the commands work fine in terminal.
What platform are you on? Version of Geany, version of GTK and Glib, from help->debug messages? Look for error messages in help->debug messages.
Xubuntu 12.10, Geany 1.22, GTK 2.24.13
Those are the error messages in Help>Debug:
[...]
Those same messages are also shown in terminal but all works however!
Right, but Geany thinks that since it returned messages on stderr that something went wrong with the command, so it doesn't do the substitution. You should have a message along the line "The executed custom command returned an error. Your selection was not changed." in the status bar.
What's the point about it BTW? Normally a command exit status should be the way to check, I don't see why we should make weird guess at a command not being allowed to output something on stderr?
I was reading the commit[1] and bug report[2] where this came from and am linking here since they're relevant and open in my browser already :) From a quick scan, the issue seems to be specifically here[3] where it sets the error flag after warning about output on stderr.
Cheers, Matthew Brush
[1] https://github.com/geany/geany/commit/697d6aff746ed1f6fe5d5545786881064de136... [2] http://sourceforge.net/tracker/index.php?func=detail&aid=1909452&gro... [3] https://github.com/geany/geany/blob/master/src/tools.c#L263