You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by nuxwin on 16 Apr 2013 12:25 UTC as Trac ticket #1489043
Hello ;
It is possible to use STDERR to send any error from the updatedb.sh script instead of STDOUT? Since this script is for users that do no want use common installation (eg. using the roundcube installer), I think this script should follow standard POSIX rule for error handling.
eg, change any error output to
fwrite(STDERR, 'error message...');
instead of:
echo 'error message...';
That will prevent some integration scripts to do some things like this (here Perl):
...
require iMSCP::Execute;
iMSCP::Execute->import();
my ($stdout, $stderr);
$rs = execute(
"$main::imscpConfig{'CMD_PHP'} $roudcubeDir/bin/updatedb.sh " .
"--version=$fromVersion --dir=$roundcubeDir/SQL --package=roundcube",
\$stdout, \$stderr
);
debug($stdout) if $stdout && ! $rs; # This because the updatedb.sh script use only STDOUT
error($stdout) if $stdout && $rs; # This because the updatedb.sh script only use STDOUT
error($stderr) if $stderr && $rs;
return $rs if $rs;
...
Also, does it not possible to use .php instead of .sh as extension? Syntax Highlighters from some IDE (such as PHPStorm) use file extension to know the driver to use so...
Thanks you.
'''
Note:''' This kind of recommendation, can be also valable for any cli scripts you are providing.
Reported by nuxwin on 16 Apr 2013 12:25 UTC as Trac ticket #1489043
Hello ;
It is possible to use STDERR to send any error from the updatedb.sh script instead of STDOUT? Since this script is for users that do no want use common installation (eg. using the roundcube installer), I think this script should follow standard POSIX rule for error handling.
eg, change any error output to
instead of:
That will prevent some integration scripts to do some things like this (here Perl):
Also, does it not possible to use .php instead of .sh as extension? Syntax Highlighters from some IDE (such as PHPStorm) use file extension to know the driver to use so...
Thanks you.
'''
Note:''' This kind of recommendation, can be also valable for any cli scripts you are providing.
Migrated-From: http://trac.roundcube.net/ticket/1489043
The text was updated successfully, but these errors were encountered: