fix(cmd): do not leak global variable

This commit is contained in:
Chris Antos 2022-10-15 14:32:49 -07:00 committed by Jan De Dobbeleer
parent cd9c8b3e5d
commit 9695f4d203

View file

@ -46,6 +46,7 @@ end
local function run_posh_command(command) local function run_posh_command(command)
command = '"'..command..'"' command = '"'..command..'"'
local _,ismain = coroutine.running() local _,ismain = coroutine.running()
local output
if ismain then if ismain then
output = io.popen(command):read("*a") output = io.popen(command):read("*a")
else else