Skip to content

Commit

Permalink
console: fix lang identification in local_read()
Browse files Browse the repository at this point in the history
Language in `local_read()` used to be set to `box.session.language` while
the latter is always `nil` and `set_language()` sets `self.language`.

Now the language in `local_read()` is identified correctly.

Needed for tarantool#4317

NO_DOC=bugfix
NO_CHANGELOG=invisible to user
NO_TEST=invisible to user
  • Loading branch information
Lord-KA committed Feb 28, 2023
1 parent caac47f commit c98074e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/box/lua/console.lua
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ local function local_read(self)
break
end
if delim == "" then
local lang = box.session.language
local lang = self.language
if not lang or lang == 'lua' then
-- stop once a complete Lua statement is entered
if local_check_lua(buf) then
Expand Down

0 comments on commit c98074e

Please sign in to comment.