workspace: Clone client table before modifying

This commit is contained in:
James Reed 2020-08-04 17:07:21 -06:00
parent ce4127d6e7
commit 2ad15ea4e5
No known key found for this signature in database
GPG Key ID: 0BE2BD33C5E8125E
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ function load_workspace(dir)
for _, c in ipairs(tbl) do
local cmd
if type(c) == 'table' and type(c[1]) == 'table' then
c = gtable.clone(c)
cmd = table.remove(c, 1)
for _, arg in ipairs(c) do
cmd[1] = cmd[1]..' '..arg