mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-01-30 04:21:19 -08:00
fix(cmd): do not leak global variable
This commit is contained in:
parent
cd9c8b3e5d
commit
9695f4d203
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue