When setting the env parameter on child_process.exec() the parent's environment gets overridden.
In order to pass down the parent's environment variables (like DOCKER_HOST) to the spawned process, process.env needs to be merged in with any new environment variables.
This should make this extension work for setups where DOCKER_HOST needs to be set (e.g. accessing Docker for Windows from within WSL). @dmlb2000 reported this before as issue #32.
When setting the
env
parameter onchild_process.exec()
the parent's environment gets overridden. In order to pass down the parent's environment variables (likeDOCKER_HOST
) to the spawned process,process.env
needs to be merged in with any new environment variables.This should make this extension work for setups where
DOCKER_HOST
needs to be set (e.g. accessing Docker for Windows from within WSL). @dmlb2000 reported this before as issue #32.