parse env before command line args

Signed-off-by: shuai-z <zs.broccoli@gmail.com>