lua: fix tarantool -e always enters interactive mode
The reason why tarantool -e always enters interactive mode is that statement after option -e isn't considered as a script. In man PUC-Rio lua there are different names for statement -e (stat) and script, but they have the same behavior regarding interactive mode. (Also cases, when interpreter loads stdin, have the same behaviour). NOTE: test for this code fix uses errinjs, and the last one should work only in debug mode, so added `release_disabled` in suite.ini. But there is a bug in test-run: `release_disable` disables tests at each build type. Partially this problem is descripted in tarantool/test-run#199. Fixes #5040
Showing
- changelogs/unreleased/fix-tarantool-e-option.md 6 additions, 0 deletionschangelogs/unreleased/fix-tarantool-e-option.md
- src/lib/core/errinj.h 1 addition, 0 deletionssrc/lib/core/errinj.h
- src/lua/init.c 23 additions, 4 deletionssrc/lua/init.c
- test/app-tap/gh-5040-inter-mode-isatty-via-errinj.test.lua 126 additions, 0 deletionstest/app-tap/gh-5040-inter-mode-isatty-via-errinj.test.lua
- test/app-tap/suite.ini 1 addition, 0 deletionstest/app-tap/suite.ini
- test/box/errinj.result 1 addition, 0 deletionstest/box/errinj.result
Loading
Please register or sign in to comment