[latex3-commits] [git/LaTeX3-latex3-l3build] master: Quote file names in unix (927752b)

GitHub noreply at github.com
Wed Mar 18 03:13:20 CET 2020


Repository : https://github.com/latex3/l3build
On branch  : master
Link       : https://github.com/latex3/l3build/commit/927752bb983b8042df893b82dcdeb9211cd21beb

>---------------------------------------------------------------

commit 927752bb983b8042df893b82dcdeb9211cd21beb
Author: Phelype Oleinik <phelype.oleinik at latex-project.org>
Date:   Tue Mar 17 23:13:20 2020 -0300

    Quote file names in unix
    
    Without quotes, file names with spaces would throw something like:
      sh: 1: [: ../build/test/file: unexpected operator


>---------------------------------------------------------------

927752bb983b8042df893b82dcdeb9211cd21beb
 l3build-file-functions.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/l3build-file-functions.lua b/l3build-file-functions.lua
index 6c420f8..7d13fc9 100644
--- a/l3build-file-functions.lua
+++ b/l3build-file-functions.lua
@@ -241,7 +241,7 @@ function direxists(dir)
     errorlevel =
       execute("if not exist \"" .. unix_to_win(dir) .. "\" exit 1")
   else
-    errorlevel = execute("[ -d " .. dir .. " ]")
+    errorlevel = execute("[ -d '" .. dir .. "' ]")
   end
   if errorlevel ~= 0 then
     return false





More information about the latex3-commits mailing list.