Dub Error Message "Invalid variable: DUB"
Andre Pany
andre at s-e-a-p.de
Sun Jun 7 16:26:17 UTC 2020
On Sunday, 7 June 2020 at 15:37:27 UTC, Paul Backus wrote:
> On Sunday, 7 June 2020 at 12:52:12 UTC, Andre Pany wrote:
>>
>> I am not sure but $DUB is a variable which could be used in
>> dub descriptor file but it isn't an environment variable.
>>
>> $DUB_EXE is an environment variable.
>>
>> Kind regards
>> Andre
>
> If what you say is true, the Dub documentation needs to be
> updated:
>
> https://dub.pm/package-format-json.html#environment-variables
Each of the table has an explanation section were they can be
used. $DUB can only be used within the dub descriptor but not
within scripts called from the hooks.
From the hooks you can use these environment variables:
https://github.com/andre2007/dub/blob/376ff5854dcd7bbc6116f72001c8c6d13eb3cbf0/source/dub/generators/generator.d#L763
Kind regards
Andre
More information about the Digitalmars-d-learn
mailing list