Hello everyone,

I'm using PAR to package Rakubrew (a Raku installation and versioning tool)  
on Windows and MacOS. I'm grateful for how easy and reliable PAR is. Thanks!

Rakubrew can act as a shim wrapper that forwards its call to other programs. 
PAR modifies several environment variables amongst others DYLD_LIBRARY_PATH. I 
suspect that the change to DYLD_LIBRARY_PATH can have unwanted side effects for 
the called program with respect to dynamically loading C libraries.

Thus I'd like to make Rakubrew reset the environment to its original state 
before doing the final "exec". I'm grateful for any clues on how to best 
approach this.

Is there any place, where the original untouched environment is persisted?
Are the variables PAR adds and the ones it modifies (and how) available 
programmatically?
Is there any chance I can hook into PAR to save the environment before PAR 
starts changing things?

My last resort would be to hard code variable names to remove and revert the 
changes to variables it modified with some regex-foo or similar. But I'd much 
prefer a different solution.

Thanks in advance for any hints!

Kind regards,
Patrick Böker


Reply via email to