use fancy environment detection for determining where to run tasks