https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16306

--- Comment #1 from Olli-Antti Kivilahti <[email protected]> ---
Created attachment 50454
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50454&action=edit
Bug 16306 - C4::Context->setCommandlineEnvironment() convenience function

There is no unified way to set the environment for commandline scripts,
even if the C4::Context->interface('commandline') explicitly allows setting
the cli interface.

Also a default user environment must be set.

This function wraps the complexity of environment setting in the command line.

Usage:

use C4::Context;
BEGIN {
    C4::Context->setCommandlineEnvironment();
}
... #Load other dependencies that might depend on the environment

or just:

...
use C4::Context;
C4::Context->setCommandlineEnvironment();
...

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to