mbutterick / pollen-users

please use https://forums.matthewbutterick.com/c/typesetting/ instead
https://forums.matthewbutterick.com/c/typesetting/
53 stars 0 forks source link

Windows: Set Pollen environment variable #128

Closed oldmankit closed 2 years ago

oldmankit commented 2 years ago

In the pollen docs it shows how to set the pollen environment variable on the command line, like this:

POLLEN=DEBUG raco pollen render test.txt ;

When I run that in Windows, it doesn't recognise the command POLLEN. Here's the error message: The term 'POLLEN=DEBUG' is not recognized as a name of a cmdlet, function, script file, or executable program.

I did a search but couldn't find any help on this one. Does anyone know how this is achieved in Windows?

I did try a few variations, like raco pollen POLLEN=DEBUG render…, to no avail.

odanoburu commented 2 years ago

Apparently you should use something like

set POLLEN=DEBUG && raco pollen render test.txt

in cmd.exe. If using powershell, it would be another incantation (see https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.2, https://stackoverflow.com/questions/1420719/powershell-setting-an-environment-variable-for-a-single-command-only)

(I don't have a windows machine so I can't test it)

oldmankit commented 2 years ago

Thanks, @odanoburu.

To sum-up, for CMD it's

set POLLEN=DEBUG && raco pollen …

and for powershell it's

$env:POLLEN='DEBUG'; raco pollen …