Windows: Set Pollen environment variable #128

Closed
opened 2 years ago by oldmankit · 2 comments
oldmankit commented 2 years ago (Migrated from github.com)

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.

In the [pollen docs](https://docs.racket-lang.org/pollen/raco-pollen.html#%28part._.The_.P.O.L.L.E.N_environment_variable%29) 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 (Migrated from github.com)

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)

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 (Migrated from github.com)

Thanks, @odanoburu.

To sum-up, for CMD it's

set POLLEN=DEBUG && raco pollen …

and for powershell it's

$env:POLLEN='DEBUG'; raco pollen …
Thanks, @odanoburu. To sum-up, for CMD it's ``` set POLLEN=DEBUG && raco pollen … ``` and for powershell it's ``` $env:POLLEN='DEBUG'; raco pollen … ```
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#128
Loading…
There is no content yet.