diff options
author | Stephen Baynham <sdbaynham@gmail.com> | 2019-10-10 06:27:43 -0700 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2019-12-02 14:16:33 -0300 |
commit | ea5788380b408894e8a7b0d165bf535d1a3fbe51 (patch) | |
tree | 167979a9528911a593bc89cabcbc141a67eca531 /spec | |
parent | 27c09f27b22b26463e7e6b47431d539c7e496c6e (diff) | |
download | luarocks-ea5788380b408894e8a7b0d165bf535d1a3fbe51.tar.gz luarocks-ea5788380b408894e8a7b0d165bf535d1a3fbe51.tar.bz2 luarocks-ea5788380b408894e8a7b0d165bf535d1a3fbe51.zip |
Add quotes around usernames to handle usernames with space on Windows
Diffstat (limited to 'spec')
-rw-r--r-- | spec/fs_spec.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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() | |||
39 | 39 | ||
40 | local make_unreadable = function(path) | 40 | local make_unreadable = function(path) |
41 | if is_win then | 41 | if is_win then |
42 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(R)") | 42 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(R)") |
43 | else | 43 | else |
44 | fs.execute("chmod -r " .. fs.Q(path)) | 44 | fs.execute("chmod -r " .. fs.Q(path)) |
45 | end | 45 | end |
@@ -47,7 +47,7 @@ describe("Luarocks fs test #unit", function() | |||
47 | 47 | ||
48 | local make_unwritable = function(path) | 48 | local make_unwritable = function(path) |
49 | if is_win then | 49 | if is_win then |
50 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(W,M)") | 50 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(W,M)") |
51 | else | 51 | else |
52 | fs.execute("chmod -w " .. fs.Q(path)) | 52 | fs.execute("chmod -w " .. fs.Q(path)) |
53 | end | 53 | end |
@@ -55,7 +55,7 @@ describe("Luarocks fs test #unit", function() | |||
55 | 55 | ||
56 | local make_unexecutable = function(path) | 56 | local make_unexecutable = function(path) |
57 | if is_win then | 57 | if is_win then |
58 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny %USERNAME%:(X)") | 58 | fs.execute("icacls " .. fs.Q(path) .. " /inheritance:d /deny \"%USERNAME%\":(X)") |
59 | else | 59 | else |
60 | fs.execute("chmod -x " .. fs.Q(path)) | 60 | fs.execute("chmod -x " .. fs.Q(path)) |
61 | end | 61 | end |