add env support

Change-Id: I7b406a4eead6879e779fa2f17050d3532865a1bb