Dub Error Message "Invalid variable: DUB"

Andre Pany andre at s-e-a-p.de
Sun Jun 7 12:58:06 UTC 2020


On Sunday, 7 June 2020 at 10:06:14 UTC, Russel Winder wrote:
> On Sun, 2020-06-07 at 10:24 +0100, Russel Winder wrote:
>> Hi,
>> 
>> Why on earth is Dub sending out this error message (Invalid 
>> variable: DUB)
>> on
>> GitLab but not on Travis-CI or locally?
>> 
>> OK, that was slightly rhetorical, more reasonably, why is dub 
>> sending out
>> this
>> message at all?
>
> I am assuming that the error comes from the line:
>
> preBuildCommands "$DUB run --compiler=$$DC unit-threaded -c 
> gen_ut_main -- -f generated/ut_dub_main.d -d $DUB"
>
> in the unittest configuration as suggested for using 
> unit-threaded. The question is why does the symbol DUB not need 
> to be defined locally or on Travis-CI, but only on GitLab?
>
> |> printenv | grep -i dub
> |>
>
> On Travis-CI and locally Dub find where it is, why does it not 
> do this on GitLab? It is at /usr/bin/dub in all cases.

$DUB is a variable but not an environment variable.
This is also the background why the environment variable $DC 
needs to be escaped here.

Kind regards
Andre



More information about the Digitalmars-d-learn mailing list