From ea5788380b408894e8a7b0d165bf535d1a3fbe51 Mon Sep 17 00:00:00 2001 From: Stephen Baynham Date: Thu, 10 Oct 2019 06:27:43 -0700 Subject: Add quotes around usernames to handle usernames with space on Windows --- spec/fs_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/fs_spec.lua b/spec/fs_spec.lua index 0acca613..e3643f78 100644 --- a/spec/fs_spec.lua +++ b/spec/fs_spec.lua @@ -39,7 +39,7 @@ describe("Luarocks fs test #unit", function() local make_unreadable = function(path) if is_win then - fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(R)") + fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(R)") else fs.execute("chmod -r " .. fs.Q(path)) end @@ -47,7 +47,7 @@ describe("Luarocks fs test #unit", function() local make_unwritable = function(path) if is_win then - fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(W,M)") + fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(W,M)") else fs.execute("chmod -w " .. fs.Q(path)) end @@ -55,7 +55,7 @@ describe("Luarocks fs test #unit", function() local make_unexecutable = function(path) if is_win then - fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(X)") + fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(X)") else fs.execute("chmod -x " .. fs.Q(path)) end -- cgit v1.2.3-55-g6feb