use cfg flag instead of evironment variable

Implement @tadej 's suggestion on !46835 (merged)

Merge request reports

Loading