puppet apply always return 0 unless detailed-exitcodes is used

Environment entry in puppet.conf must be inside [agent]