[builder] extract environment from morsebuilder