Updated to include logic to handle no environments to skip.