Alexander Turenko
authored
Fixes #7714 @TarantoolBot document Title: TT_PRELOAD A script file or a module may be specified in the `TT_PRELOAD` environment variable to load before the main script. For example: ```shell $ TT_PRELOAD=/path/to/foo.lua tarantool main.lua ``` The `foo.lua` script will be executed before `main.lua`. ```shell $ TT_PRELOAD=foo.bar.baz tarantool main.lua ``` The `foo.bar.baz` module will be loaded before executing `main.lua`. A value that ends with `.lua` is considered as a script file, otherwise it is considered as a module name. Several files or modules may be passed as a semicolon separated list: ```shell $ TT_PRELOAD="/path/to/foo.lua;foo.bar.baz" tarantool main.lua ``` Don't forget quotes, a shell interprets a semicolon on its own. Redundant (duplicated, leading, trailing) semicolons are ignored. If something goes wrong at script/module execution, tarantool reports the problem and exits. A script receives a path to the file in `...`, a module gets the module name. `arg` is the same as for the main script.
Name | Last commit | Last update |
---|