Skip to content

Commit

Permalink
fix(cmd): use process ID for cache
Browse files Browse the repository at this point in the history
resolves #5182
  • Loading branch information
JanDeDobbeleer committed Jun 28, 2024
1 parent a184317 commit dc002fc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/shell/scripts/omp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@ if '::UPGRADE::' == 'true' then
end

-- Cache PID

function generateCustomUUID()
local template = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
return string.gsub(template, '[x]', function(c)
local v = math.random(0, 0xf)
return string.format('%x', v)
end)
end

os.setenv("POSH_PID", generateCustomUUID())
os.setenv("POSH_PID", os.getpid())

-- Helper functions

Expand Down

0 comments on commit dc002fc

Please sign in to comment.