DaanDeMeyer / reproc

A cross-platform (C99/C++11) process library
MIT License
552 stars 65 forks source link

Extra Variables #86

Open z64rankaisija opened 2 years ago

z64rankaisija commented 2 years ago

Currently the variables provided through extra will be ignored by the processes in the case where I would use something that already exists, like PATH. Reasom being that the user provided extras are added last to the list.

I would suggest adding two options to this:

  1. strcat to already existing varibles

  2. Override already existing variables (add the user extras first)

Default behaviour being the way reproc handles it atm.

DaanDeMeyer commented 2 years ago

Sure, we can add REPROC_ENV_EXTEND_MERGE or so that merges environment variables with the same name. I'd be happy to review a PR that adds this

z64rankaisija commented 2 years ago

I'll start working on it then. 👍