5

I am getting into l3build for testing and installing my homegrown packages. It looks very useful. I hit a snag today when I put a bundle inside a directory that had a space in the name.

I keep all my source-controlled packages in repositories on github, and I check them out onto my local machine inside a ~/github directory. If I change the name of ~/github to ~/git hub, the install script won't work anymore:

$ cd ~/git\ hub/mypkg 
$ l3build install --dry-run
sh: line 0: export: `hub/mypkg/build/local:': not a valid identifier
sh: /Users/matthew/git: No such file or directory

I don't know lua well enough to find exactly where this error comes from. But I can see that it's caused by a path with a space that's treated like two separate paths.

The obvious workaround is don't do that, and I'm open to changing my setup to guarantee no spaces in directory names. But I'd rather not—the directory in question is a Dropbox folder that's shared with somebody else, and if I change the name of the folder they might need to change some stuff too. Also, I'm a Mac user and I think it's pretty common practice to have folder names with spaces in them. So it would be nice if l3build could work with that.

  • Its always been a problem since we moved from 8.3 on dos many packages were upated from core code that never "allowed" for such irresponsible behaviour and that's why there were sometimes variations or kludges for each platform, eventually some one may go through all the packages to test for a common compliance with Unicode including U+0032 or is that #0020 – user170109 Oct 24 '18 at 22:34
  • @KJO l3build is a lua program so which core code do you refer to? – TeXnician Oct 25 '18 at 6:34
  • @TeXnician I'm sure your well aware its Windows directory/file handling as distinct from other OS that is usually the underlying root of such issues and any aged developer would be aware to test filename strings for all possibilities 'quoted" \"escaped etc – user170109 Oct 25 '18 at 15:24
  • @KJO I agree on the Windows part, but just didn't get which core code and packages you referred to because I understood the question to be about the lua script l3build. But as it is canonically addressed now, there's no need to discuss this further :) – TeXnician Oct 25 '18 at 15:28
  • I note there was a fresh release on 25th Have you had a chance to test, if its fixed for you, can you accept @Joseph-Wright 's answer? – user170109 Oct 29 '18 at 16:38
6

Updated answer

Thanks for the report. I believe that this should now be fixed in the development version, and will arrange a CTAN release today.


Original answer

Whilst there is no special treatment of spaces inside l3build, there are places that an absolute path is returned. These may end up containing spaces, as you've observed, and currently there is no quoting/escaping for such spaces. The one in question here is relatively easy to track down, but there are likely (lots) of others (most obviously, the user can set the various relative directories to anything). I've logged an https://github.com/latex3/l3build/issues/76: I suspect a full fix will need a bit of work.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.