Add environment option
529: portal command environment
Merge pull request #531 from andrerod/dev

Multiple fixes