From 63a8fb17b00b8b60419ad34dae31a4143f744be5 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 25 Jul 2018 19:34:19 -0300 Subject: fetch: propagate error when failing to make a temp dir --- src/luarocks/fetch.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/luarocks/fetch.lua b/src/luarocks/fetch.lua index a49bb8f1..cd78c327 100644 --- a/src/luarocks/fetch.lua +++ b/src/luarocks/fetch.lua @@ -149,7 +149,10 @@ function fetch.fetch_and_unpack_rock(rock_file, dest) return nil, "Failed unpacking rock file: " .. err end else - unpack_dir = fs.make_temp_dir(name) + unpack_dir, err = fs.make_temp_dir(name) + if not unpack_dir then + return nil, "Failed creating temporary dir: " .. err + end end if not dest then util.schedule_function(fs.delete, unpack_dir) -- cgit v1.2.3-55-g6feb