From ab5b1380c1717c22c9d6188b334e8a93c877be57 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 19 Sep 2018 10:32:03 -0700 Subject: fs.unix: fallback for when $USER variable is unset Also, declare Unix version of current_user in luarocks.fs.unix.tools, so that the pure-Lua version based on LuaPosix takes precedence when available. --- spec/install_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/install_spec.lua b/spec/install_spec.lua index 24dbdb30..1154e9b9 100644 --- a/spec/install_spec.lua +++ b/spec/install_spec.lua @@ -54,7 +54,9 @@ describe("luarocks install #integration", function() end) it("fails with local flag as root #unix", function() - assert.is_false(run.luarocks_bool("install --local luasocket ", { USER = "root" } )) + if test_env.TYPE_TEST_ENV ~= "full" then + assert.is_false(run.luarocks_bool("install --local luasocket ", { USER = "root" } )) + end end) it("fails with no downloader", function() -- cgit v1.2.3-55-g6feb