dub icon indicating copy to clipboard operation
dub copied to clipboard

DUB error out on missing directory before `preGenerateCommands`

Open Geod24 opened this issue 4 years ago • 0 comments

The fix for #1474 was incomplete. The following errors out when newly built:

{
    "name": "test",
    "preGenerateCommands": [ "mkdir -p objects/res/" ],
    "sourceFiles-posix": [ "objects/res/*.o" ],
    "sourceFiles-windows": [ "objects/res/*.obj" ]
}

With the following directory structure:

% ll -R
total 1768
-rw-r--r--  1 geod24  staff     179 Jun  7 19:27 dub.json
drwxr-xr-x  3 geod24  staff      96 Jun  7 19:24 source
-rwxr-xr-x  1 geod24  staff  898928 Jun  7 19:26 test

./source:
total 8
-rw-r--r--  1 geod24  staff  89 Jun  7 19:24 app.d

The point is that objects/res/ will be created during the preGenerateCommand, but the error happens during the first glob expansion.

Geod24 avatar Jun 07 '21 10:06 Geod24