# questions

Richard Purvis

06/01/2023, 8:18 PM
Hello, if I want to set an environment variable before running a pipeline or importing any node libraries, what would be the best way to do that? I've tried setting via
before the import statements in my node scripts, to no avail. Edit: I resolved this by putting the
os.environ["VAR"] = "value"
call at the top of my
file. I don't know if this is the best solution, but since this is a workaround until a bugfix occurs in one of the project dependencies I'm happy to leave it there.

Nok Lam Chan

06/02/2023, 8:45 AM
Can you elaborate a bit what’s the bug here? Doing it in settings is fine or using hook. Can you use parameter instead of environment variable? What sort of parameters that you need to set at runtime?

Richard Purvis

06/02/2023, 12:34 PM
Here's a reference for the bug I'm trying to work around: